Macro

Bee

Registered User.
Local time
Today, 21:23
Joined
Aug 1, 2006
Messages
486
Hi,

Does anybody have any example code for running a macro in VBA please?

Any help will be very much appreciated.
B
 
Convert your macros to code. It will make the Db alot easier to manage as it grows.

Dave
 

Attachments

Oldsoftboss said:
Convert your macros to code. It will make the Db alot easier to manage as it grows.

Dave
Thanks for the example. My macro exports a table to a spreadsheet form; the macro works fine when I specify the full path. For example C:\myFolder\db\excel\filename. If I don't specify the full path and just wrote the filename, it creates the file in My Documents!

If I write a path like excel\filename, it returns an error. Also, the reason I want to write it this way is that I don't want the macro to return an error whenever I move the directory 'db' to another location.

Thank you,
B
 
Logically, you do need to specify the full path.
As for bypassing error messages, that's definitely not a good reason to use macro's instead of VBA ;)

RV
 
RV said:
Logically, you do need to specify the full path.
As for bypassing error messages, that's definitely not a good reason to use macro's instead of VBA ;)

RV
Absolutely not. i am not wanting to write the full path because it's flexible and will save me having to modify all the paths whenever I want to move the location of the folder where the DB resides.

As for using either macros or VBA, I don't mind as long as they do the job.

Cheers,
B
 
Absolutely not.

Guess you didn't understand my reply....
You'll simply have to provide the full path to export your xls file to, you haven't got much of a choice ;)

However, you can create a treeview that enables you to select the folder you want to store your file to.

RV
 
RV said:
Guess you didn't understand my reply....
You'll simply have to provide the full path to export your xls file to, you haven't got much of a choice ;)

However, you can create a treeview that enables you to select the folder you want to store your file to.

RV
Thanks.
I am not sure how a treeview will work though. Will it prompt you when you press a button about where you want to save it?

An example will be very helpful.

Regards,
Bee
 

Users who are viewing this thread

Back
Top Bottom