parameter to open file name in macro
Assuming you had your loop set up as:
For Each Wb In myFolder
For Each Ws In Wb
If Not Ws Is Nothing Then
shName = Ws.Name
MsgBox shName
Ws PrintOut
End If
Next
Next
Where the message box is inserted above you could use a
Yes/No criteria to determine if you want to print the
particular sheet and insert code that would skip to the next
sheet if print is not required.
Without seeing your actural code, I don't know if this is what
you were looking for, but it should give you an idea of how to
handle it.
"KrisN" wrote:
I am trying to write a macro to print many worksheets from many workbook.
However, each month some of the worksheet have different naming based on the
month. For example: "NOV_PJ" and the next month "DEC_PJ". is there a way to
have a parameter in the macro to ask for the file name before having the
macro print out the worksheet?
|