Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Alec H
 
Posts: n/a
Default Macro to choose a macro


Hi,

This is where I demonstrate my breathtaking ignorance.....

This is my code;




Code:
--------------------


Sub Letter1Printchoose()

Sheets("Stage 2 Letter").Select
If Range("C23").Value < "" Then Run ([Sub Letter1Printmulti()])
If Range("C23").Value = "" Then Run ([Sub Letter1Printsingle()])
Sheets("Customer List").Select

End Sub


--------------------


Why doesn't it work?

My only excuse is that it is Friday.......


--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518720

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro to choose a macro

How about:

Sub Letter1Printchoose()

Sheets("Stage 2 Letter").Select
If Range("C23").Value < "" Then
call Letter1Printmulti
else
call Letter1Printsingle
end if
Sheets("Customer List").Select

End Sub

Alec H wrote:

Hi,

This is where I demonstrate my breathtaking ignorance.....

This is my code;

Code:
--------------------


Sub Letter1Printchoose()

Sheets("Stage 2 Letter").Select
If Range("C23").Value < "" Then Run ([Sub Letter1Printmulti()])
If Range("C23").Value = "" Then Run ([Sub Letter1Printsingle()])
Sheets("Customer List").Select

End Sub


--------------------

Why doesn't it work?

My only excuse is that it is Friday.......

--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518720


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Alec H
 
Posts: n/a
Default Macro to choose a macro


Dave,

Thank you for that, however it doesnt appear to have resolved the
issue.

Simply Print1Letterchoose is intended to be a user activated (via
button on worksheet) macro that checks the contents of cell C23 and
then either runs Print1Lettermulti or Print1Lettersingle dependant on
the result.

Both Print1Lettermulti and Print1Lettersingle work perfectly
independantly but I cant seem to get Print1Letterchoose to "see"
them......

Thanks,

Alec.


--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518720

  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro to choose a macro

What sheet contains the C23 that you want to inspect?

Maybe dropping the selection

Sub Letter1Printchoose()

if Sheets("Stage 2 Letter").Range("C23").Value < "" Then
call Letter1Printmulti
else
call Letter1Printsingle
end if

End Sub

====
If that doesn't work...

What kind of button did you use? I guessed it was a button from the Forms
toolbar--not a command button from the Control Toolbox toolbar.

Where did you put this code (including the Letter1printmulti and
letter1printsingle routines)?

I'm guessing that you didn't put them in a general module (where they belong).
I'm guessing that you put them behind one of the worksheets--or behind
ThisWorkbook????



Alec H wrote:

Dave,

Thank you for that, however it doesnt appear to have resolved the
issue.

Simply Print1Letterchoose is intended to be a user activated (via
button on worksheet) macro that checks the contents of cell C23 and
then either runs Print1Lettermulti or Print1Lettersingle dependant on
the result.

Both Print1Lettermulti and Print1Lettersingle work perfectly
independantly but I cant seem to get Print1Letterchoose to "see"
them......

Thanks,

Alec.

--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518720


--

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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Can T Get Macro To Run! Nipper New Users to Excel 2 November 4th 05 04:48 AM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Help with macro to choose printer Wind54Surfer New Users to Excel 2 December 21st 04 12:09 AM


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