LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Help in changing code to see new file name (Dave Peterson)

Dave can you help me with this. I am not exactly sure what you mean.

Q: Is the activeworkbook the same as the workbook that was opened?
A: Yes, but when the Workbook is opened it has one file name, but as soon as
you update it and save it the name changes. Then when you try and re-update
it the new name is not found, so I get the run Time Error.

Not exactly sure what you mean:

If yes, then declare the bk variable in a General module and make it public.

Public bk as workbook

(Remove the dim statement in the open procedure.)

Then use the bk variable to saveas

bk.saveas

And use bk as object to represent that workbook--no matter what the name is.

What's happening is when I save the workbook to a different name, because it
auto assigns the file name to according to the information on the User form.

The Workbook changes from the name "Master Engineering Spec.xlsm" to the
following.
strFile = "SPEC " & CLLI_Code_1.Value _
& Space(1) & TEO_No_1.Value _
& Space(1) & CES_No_1.Value _
& Space(1) & TEO_Appx_No_2.Value

I need help in changing the code so that it will recognize the new file
name. I posted all the code in my prior post on 1/7/2010 "Run Time Error on
File Name".

If you need me to repost the code let me know.


 
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
To: Dave Peterson V Excel Discussion (Misc queries) 5 May 27th 09 01:44 AM
Dave Peterson Rich_Patterson Excel Discussion (Misc queries) 2 January 26th 07 08:56 PM
Dave Peterson... jnf40 Excel Programming 9 September 9th 06 06:13 PM
to Dave Peterson Ross Excel Discussion (Misc queries) 2 September 18th 05 04:45 PM
Dir () code -- Dave Peterson Dave Peterson[_3_] Excel Programming 6 August 18th 04 03:37 AM


All times are GMT +1. The time now is 09:24 AM.

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

About Us

"It's about Microsoft Excel"