Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Quick and Easy Part 2

Hello,
What is the proper syntax to call a sub routine that is in the code for
sheet1, from the ThisWorkbook level code?

Thanks,
DBAL.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Quick and Easy Part 2


myMacro

but ensure it is a public (that is, not private) sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DBAL" wrote in message
...
Hello,
What is the proper syntax to call a sub routine that is in the code for
sheet1, from the ThisWorkbook level code?

Thanks,
DBAL.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Quick and Easy Part 2

Thanks Bob,
So it is the same then even though the 'calling' sub is at the workbook
level and the 'called' sub is at the worksheet level ... just name the sub
routine. But the main thing is to make sure that sub routine is public and
not private. If that isn't correct please let me know. Otherwise Thanks
Again.

DBAL.

"Bob Phillips" wrote:


myMacro

but ensure it is a public (that is, not private) sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DBAL" wrote in message
...
Hello,
What is the proper syntax to call a sub routine that is in the code for
sheet1, from the ThisWorkbook level code?

Thanks,
DBAL.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Quick and Easy Part 2

No sorry, missed the sheet bit. It should be

Sheet1.myMaacro

where sheet1 is the codename of the worksheet, not its Excel name. The
public bit still applies.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DBAL" wrote in message
...
Thanks Bob,
So it is the same then even though the 'calling' sub is at the workbook
level and the 'called' sub is at the worksheet level ... just name the sub
routine. But the main thing is to make sure that sub routine is public

and
not private. If that isn't correct please let me know. Otherwise Thanks
Again.

DBAL.

"Bob Phillips" wrote:


myMacro

but ensure it is a public (that is, not private) sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DBAL" wrote in message
...
Hello,
What is the proper syntax to call a sub routine that is in the code

for
sheet1, from the ThisWorkbook level code?

Thanks,
DBAL.






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
Looking for a easy and quick way to share a workbook only with mys OldRetiredGuy Excel Discussion (Misc queries) 1 November 24th 09 05:09 AM
Quick/Easy Question? Dave Excel Discussion (Misc queries) 2 February 24th 09 06:44 PM
Quick and easy labeling mmednick Excel Discussion (Misc queries) 4 December 7th 05 01:12 AM
Quick and easy chisigs2 Excel Worksheet Functions 2 August 24th 05 08:36 PM
Quick and Easy! DBAL[_6_] Excel Programming 3 May 13th 05 08:52 AM


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