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: 10
Default Run procedure in Personal.xls which needs name of calling workbook

I currently have a spreadsheet set up with coding to automatically configure
the individual sheets based on which farms and how many loads at each farm
are scheduled.

After sheet is set up, coding is NO LONGER NEEDED, and currently saves the
workbook with a new name, then removes ALL the VBA coding from the workbook.

I want to be able to have the VBA coding removed from the workbook THEN have
the workbook save itself.

I tried it with the save procedure AFTER the code removal procedure, but
once the code is removed, the save procedure never executes (as expected) So
I'm thinking I probably need the code remove/workbook save procedure in
another workbook. But THAT would mean I'd have to be able to call that
procedure FROM the workbook being worked on, and get that external procedure
to know which workbook was previously active and had called the procedure.

I tried copying the save/code remove from the workbook to the Personal.xls,
but now I need the way to tell the procedure which workbook it was called
from.

Help on the RUN method says the ONLY type of arguments that RUN will allow
to be sent to the external procedure are NUMERIC, and will NOT accept
variables or strings to be passed.

Is this ONE area where the Help system is wrong? If not, how can I tell the
procedure in my Personal.xls the name of the active workbook that had called
the procedure? When I execute the RUN method, the ActiveWorkbook changes to
Personal.xls, which seems to mean I need some way to set the
ActiveWorkbook.Name to a variable, then have some way to send the contents of
that variable TO the procedure in the Personal.xls workbook so it can know
which workbook it is supposed to be removing the code from and saving.
 
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
Calling sub procedure Yossi[_2_] Excel Programming 2 August 21st 05 02:01 PM
Calling a procedure in a procedure Norman Jones Excel Programming 8 August 20th 04 07:53 PM
Calling a procedure in a procedure N10 Excel Programming 2 August 18th 04 12:49 AM
Calling a procedure in a procedure Don Guillett[_4_] Excel Programming 1 August 17th 04 11:31 PM


All times are GMT +1. The time now is 12:48 PM.

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"