Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Would someone be so kind as to help me with the following question?
I would like to include a macro in a workbook that, upon running, displays an input box for the user to input a worksheet name (e.g. Sheet1) which in turn would be selected, print range set and ultimately printed. Sincere thanks to any and all who are so gracious to offer their help with these matters. Regards, Tim Malone |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is something you can use.
Sub PrintWS() Dim ws As Worksheet Dim sName$ On Error GoTo ErrorInPrintWS sName = InputBox("Enter worksheet name", "Print") If sName < "" Then Set ws = Worksheets(sName) ws.PrintOut End If Exit Sub ErrorInPrintWS: Exit Sub End Sub "TimMalone" wrote: Would someone be so kind as to help me with the following question? I would like to include a macro in a workbook that, upon running, displays an input box for the user to input a worksheet name (e.g. Sheet1) which in turn would be selected, print range set and ultimately printed. Sincere thanks to any and all who are so gracious to offer their help with these matters. Regards, Tim Malone |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! It works great. I can't believe how quickly you were able to do
this...I have much to learn. "Alok" wrote: Here is something you can use. Sub PrintWS() Dim ws As Worksheet Dim sName$ On Error GoTo ErrorInPrintWS sName = InputBox("Enter worksheet name", "Print") If sName < "" Then Set ws = Worksheets(sName) ws.PrintOut End If Exit Sub ErrorInPrintWS: Exit Sub End Sub "TimMalone" wrote: Would someone be so kind as to help me with the following question? I would like to include a macro in a workbook that, upon running, displays an input box for the user to input a worksheet name (e.g. Sheet1) which in turn would be selected, print range set and ultimately printed. Sincere thanks to any and all who are so gracious to offer their help with these matters. Regards, Tim Malone |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |