Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Using user defined workbook name in macro worksheet functions

I have a number of macros that work to create reports based off of a model I
have built. I want users to be able to run this macro and have it create a
separate workbook where the report is generated. To create the report, I
have a number of worksheet functions running in a macro.

Currently I have hard-coded workbook name in my macros. I want the macro to
actually look to see what the user has named the model file and generate the
report off that. The worksheet names will not change.

Below is a snipet of one portion of the report creating macro. Essentially
"functional generic estimating model loaded 1.1.xls" should be whatever the
user has named their file.


Sub Tech_Rates()

Range("AM64").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-38],'[Functional Generic Estimating Model Loaded
1.1.xls]Plan'!R2170C242:R2229C248,7,FALSE)"

Range("AM64").Select
Selection.AutoFill Destination:=Range("AM64:AM123"),
Type:=xlFillValues
Range("AM64:AM123").Select
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
User defined functions without using VBA. [email protected] Excel Discussion (Misc queries) 0 June 13th 06 05:50 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM
User Defined Worksheet Functions? Brad Excel Programming 2 February 18th 04 07:23 PM
User defined worksheet functions kevin[_2_] Excel Programming 1 September 4th 03 09:08 PM


All times are GMT +1. The time now is 08:28 PM.

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"