Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default Simple Question..if there is such a thing in Excel

Hi Gang,

I used the "Save" and also the "SaveAs" command in a module but didn't
specify a path.....I always thought that if no path was specified, the Save
would follow the path that the file was opened from.....apparently not....the
Save and the SaveAs, in my case, saved to "My Documents". This is not where
the file was opened from. However, I was able to deal with this by
specifying a complete path in the "Save" command.

Is this normal behavior for VBA and is it necessary in all cases to specify
a complete path?

TIA,

Don
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Simple Question..if there is such a thing in Excel

you can use something like fpath = thisworkbook.path

this will give you the path of the opened workbook

i always use

fPath = ThisWorkbook.Path & "\"
--


Gary


"Don" wrote in message
...
Hi Gang,

I used the "Save" and also the "SaveAs" command in a module but didn't
specify a path.....I always thought that if no path was specified, the Save
would follow the path that the file was opened from.....apparently not....the
Save and the SaveAs, in my case, saved to "My Documents". This is not where
the file was opened from. However, I was able to deal with this by
specifying a complete path in the "Save" command.

Is this normal behavior for VBA and is it necessary in all cases to specify
a complete path?

TIA,

Don



  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default Simple Question..if there is such a thing in Excel

Thanks for the reply Gary, I'll give that a try. Learn something new
everyday on here.....thanks to all you guys and gals.

Don

"Gary Keramidas" wrote:

you can use something like fpath = thisworkbook.path

this will give you the path of the opened workbook

i always use

fPath = ThisWorkbook.Path & "\"
--


Gary


"Don" wrote in message
...
Hi Gang,

I used the "Save" and also the "SaveAs" command in a module but didn't
specify a path.....I always thought that if no path was specified, the Save
would follow the path that the file was opened from.....apparently not....the
Save and the SaveAs, in my case, saved to "My Documents". This is not where
the file was opened from. However, I was able to deal with this by
specifying a complete path in the "Save" command.

Is this normal behavior for VBA and is it necessary in all cases to specify
a complete path?

TIA,

Don




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have a question on a homework thing I have using excell proudmomof2 Excel Discussion (Misc queries) 4 March 10th 07 11:39 PM
Simple IF thing? a94andwi[_12_] Excel Programming 7 October 11th 05 04:24 PM
Why does this simple thing not work? Peter[_55_] Excel Programming 4 September 22nd 05 06:40 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple Thing Brian Excel Programming 2 December 10th 04 08:41 PM


All times are GMT +1. The time now is 01:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"