Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Calling a Sub in Personal.xls

Another option is to change the personal.xls project's name (from the generic
VBAProject) if you haven't already.

(and save your personal.xls with that new project name.)

Then use:
Select the other workbook's project.
Tools|References
and create a reference to your personal.xls project.

Then you can use the UDF just like it was built into excel:

keyval = somefunction(keyval, 2, 0)



Jim Parsells wrote:

Nevermind --- someday I'll learn which search terms will get me what I need.
Just in case someone else wants this --

KeyVal = Application.Run("Personal.xls!SomeFunction", KeyVal, 2, 0)

You best be calling a function, because Application.Run turns all ByRef
parameters into ByVal, so you won't be returning a value in one of the
parameters.
--
Jim Parsells

"Jim Parsells" wrote:

I just can't find the right syntax.
In some workbook, I wish to call a Sub in my Personal.xls. Personal.xls is
loaded, of course, and I can use its Macros from any workbook while in Excel.
However, I cant find the right syntax to refer to Subs in that workbook from
VBA.

Help,
--
Jim Parsells


--

Dave Peterson
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
Run procedure in Personal.xls which needs name of calling workbook rcmodelr Excel Programming 4 September 21st 05 11:16 PM
Personal macro workbook and personal.xls John Kilkenny Excel Discussion (Misc queries) 1 June 14th 05 09:43 PM
Calling a function without starting with "Personal!" Tom Ogilvy Excel Programming 0 June 18th 04 03:45 PM
personal.htm & personal.xls in Macro Rasoul Khoshravan Azar Excel Programming 0 January 21st 04 05:27 PM


All times are GMT +1. The time now is 05:08 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"