Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
vba

ResolvedVersion 2007

Hugh has attended:
Excel VBA Intro Intermediate course

VBA

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

Edited on Wed 11 Feb 2009, 15:38

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.

Excel tip:

Outlining - Grouping rows or columns

Highlight want you want to group and press ALT + SHIFT + left cursor arrow

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.