Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Personal.XLS Prob.

I have a family of macros and functions associated with a WB. I have now
created a subset of the WB's data into a new WB. The main processing macro is
large, and makes calls to a number of macros and functions.

I copied the Modules for all the associated macros and functions from their
original location to my Personal.XLS WB using Export and Import. Everything
is visible when I am in the VBA IDE, but when I make a call such as this:

Call Initializing.InitCodes(intK, blnCodes(), strSalaryOrHour, intWksCount,
strQualErnCd, intQualPeriod)

I get "Object required 424". Also when I do Alt-F8 the macros and functions
of the Modules in Personal.XLS do not appear to be listed (at least this one
isn't). After surfing around here I thought I had found my "AHA" moment when
one of the replies told a person who had queried with something similar, to
exit Excel and restart. Didn't work for me.

I'm willing to bet it's something truly trivial I am missing -- just can't
seem to think what it might be <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Personal.XLS Prob.

Any function or sub that contains argument will not apper in Alt+F8 since

typing something like

Mymacro "AA",6,"bb"

would seem counter intuitive. It actually works, but mymacro is not listed
- you have to know to do it.

You can't call a macro from another workbook in code unless you create a
reference to that workbook (which is usually undesirable). You have to use
application.Run

Application.Run "Personal.xls!Initializing.InitCodes, _
intK, blnCodes(), strSalaryOrHour, intWksCount, _
strQualErnCd, intQualPeriod

This assumes that Initializing is the name of your module.

Note that the arguments are listed as a comma separated list along with the
macro name, not in the same format as using call. See the help on
Application.run for details.

--
Regards,
Tom Ogilvy


"Dave Birley" wrote:

I have a family of macros and functions associated with a WB. I have now
created a subset of the WB's data into a new WB. The main processing macro is
large, and makes calls to a number of macros and functions.

I copied the Modules for all the associated macros and functions from their
original location to my Personal.XLS WB using Export and Import. Everything
is visible when I am in the VBA IDE, but when I make a call such as this:

Call Initializing.InitCodes(intK, blnCodes(), strSalaryOrHour, intWksCount,
strQualErnCd, intQualPeriod)

I get "Object required 424". Also when I do Alt-F8 the macros and functions
of the Modules in Personal.XLS do not appear to be listed (at least this one
isn't). After surfing around here I thought I had found my "AHA" moment when
one of the replies told a person who had queried with something similar, to
exit Excel and restart. Didn't work for me.

I'm willing to bet it's something truly trivial I am missing -- just can't
seem to think what it might be <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Personal.XLS Prob.

Wow! Not as trivial as I imagined <g! Thanks a kajillion, Tom.
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Tom Ogilvy" wrote:

Any function or sub that contains argument will not apper in Alt+F8 since

typing something like

Mymacro "AA",6,"bb"

would seem counter intuitive. It actually works, but mymacro is not listed
- you have to know to do it.

You can't call a macro from another workbook in code unless you create a
reference to that workbook (which is usually undesirable). You have to use
application.Run

Application.Run "Personal.xls!Initializing.InitCodes, _
intK, blnCodes(), strSalaryOrHour, intWksCount, _
strQualErnCd, intQualPeriod

This assumes that Initializing is the name of your module.

Note that the arguments are listed as a comma separated list along with the
macro name, not in the same format as using call. See the help on
Application.run for details.

--
Regards,
Tom Ogilvy


"Dave Birley" wrote:

I have a family of macros and functions associated with a WB. I have now
created a subset of the WB's data into a new WB. The main processing macro is
large, and makes calls to a number of macros and functions.

I copied the Modules for all the associated macros and functions from their
original location to my Personal.XLS WB using Export and Import. Everything
is visible when I am in the VBA IDE, but when I make a call such as this:

Call Initializing.InitCodes(intK, blnCodes(), strSalaryOrHour, intWksCount,
strQualErnCd, intQualPeriod)

I get "Object required 424". Also when I do Alt-F8 the macros and functions
of the Modules in Personal.XLS do not appear to be listed (at least this one
isn't). After surfing around here I thought I had found my "AHA" moment when
one of the replies told a person who had queried with something similar, to
exit Excel and restart. Didn't work for me.

I'm willing to bet it's something truly trivial I am missing -- just can't
seem to think what it might be <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC

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
prob with dates in VBA dee Excel Discussion (Misc queries) 3 March 4th 08 02:19 PM
CSE Formula Prob pdberger Excel Worksheet Functions 4 February 16th 08 03:51 AM
Counting prob superkopite Excel Discussion (Misc queries) 13 January 23rd 06 09:18 AM
Personal macro workbook and personal.xls John Kilkenny Excel Discussion (Misc queries) 1 June 14th 05 09:43 PM
if function prob Manisha[_2_] Excel Programming 2 April 23rd 04 03:46 PM


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