vba
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA

VBA

resolvedResolved · Low Priority · Version 2007

replyReply Thu 8 Jan 2009, 16:35Delegate Hugh said...

Hugh has attended:
Excel VBA Intro Intermediate course

VBA

bets way to make a filepath to another workbook which i can change easily

For upcoming training course dates see: Pricing & availability

replyReply Wed 11 Feb 2009, 15:37 Edited on Wed 11 Feb 2009, 15:38Trainer Stephen said...

RE: VBA

Hi Hugh

Thanks for your question

It is possible to create a new folder at a particular location by using the mkdir function.

For example, the following code will create a new folder in my documents. The folder's name is specified by the variable strFolder.

MkDir "C:\Documents and Settings\Development\My Documents\" & strFolder

You could also use the SaveAs method to save a file to a particular directory

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Development\My Documents\" & strFolder & "\" & strName & ".xls"


Hope this is useful

Regards

Stephen

Wed 18 Feb 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
advanced excel courses and other Microsoft training courses.

Excel tip:

Paste a web address into the hyperlink address field

If you copy a web address the only way to paste into the address field of the hyperlink box is to use CTRL + V. Right click paste does not work.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard