Macro within Macro

G

Guest

I got help from a user the other day that helped me create a macro that will
ask you what worksheet to print. Now i was wondering if i could go a step
further. Instead of typing in the worksheet you want to print (See Below) I
want to know if it can come up with a list and you can choose which one to
print. Below is a portion of the current macro that i have.

Title = "PRINT SCREEN QUESTION"
Config = vbOKCancel + vbQuestion
Ans = MsgBox(msg, Config, Title)
If Ans = vbOK Then
If Ans = vbCancel Then Exit Sub
Dim PReport As Variant
PReport = InputBox("Enter an Account Number (1-4) for the Data Input
sheet to Print", "Print Report", 1)
Select Case PReport
Case 1
Call Print1
Case 2
Call Print2
Case 3
Call Print3
Case 4
Call Print4
Case ""
MsgBox "User Cancelled"
Case Else
MsgBox "You must enter and Integer" & Chr(10) & "Between 1 and 4"
End Select
 
B

Bob Phillips

You might want to try the technique in this previous posting
http://tinyurl.com/cpg3m

Just change
ActiveWorkbook.Worksheets(cb.Caption).Select

to
ActiveWorkbook.Worksheets(cb.Caption).Print

to print them

--

HTH

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

Guest

Bob

I guess i dont see where i would change what you suggested. You said change
ActiveWorkbook.activeworksheets(cb.Caption).Select
To
Activeworkbook.activeworksheets(cb.Caption).Print

Where would i put that in my formula?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top