T
tkaplan
I have the following code in my workbook:
Dim wbpath AS String
With ThisWorkbook
wbpath = .Path
End With
ChDir wbpath
FileName = Brand & txtCenter.Value & " FY2006 Audit Form"
ActiveWorkbook.SaveAs FileName
This saves the workbook in the same location as it currently is bu
under a new name. This works fine.
The problem i'm having:
I am distributing this workbook on a flash drive. when i open the fil
from there and run the macro, it saves the new file to my documents
not to the location of the original.
Is there something wrong with my code? or is there something with exce
that wont let you do a save as to a removable drive?
i need the file to save that no matter where the user runs it from
they will always know that the new file will be in the same folder.
Thanks in advance
Dim wbpath AS String
With ThisWorkbook
wbpath = .Path
End With
ChDir wbpath
FileName = Brand & txtCenter.Value & " FY2006 Audit Form"
ActiveWorkbook.SaveAs FileName
This saves the workbook in the same location as it currently is bu
under a new name. This works fine.
The problem i'm having:
I am distributing this workbook on a flash drive. when i open the fil
from there and run the macro, it saves the new file to my documents
not to the location of the original.
Is there something wrong with my code? or is there something with exce
that wont let you do a save as to a removable drive?
i need the file to save that no matter where the user runs it from
they will always know that the new file will be in the same folder.
Thanks in advance