An implementation of Visual Basic that is built into Microsoft products.
Not familiar with ActiveSheet. You are talking to a novice with VBA, here. Will check out ActiveSheet.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
how do I create a macro that will work with any worksheet I choose, within the same workbook? i.e. a PRINT macro whereby I select certain cells in a worksheet to be printed.
An implementation of Visual Basic that is built into Microsoft products.
Not familiar with ActiveSheet. You are talking to a novice with VBA, here. Will check out ActiveSheet.
One way would be to create a procedure that takes a Worksheet as an argument:
public sub DoSomePrinting(byref ws as Excel.Worksheet)
'do some printing with this ws data
end sub
Rather than creating such procedure and passing in a Worksheet object, you can also use ActiveSheet to refer to the current one.