Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define array of sheets by inputbox
Hello
I'm editing a procedure to copy certain sheets TOGETHER from Workbook A to Workbook B. In book A the user will be asked to click his way to book B. I know how to do that. But with book B activated an inputbox should prompt for the sheets to be copied together (selecting while holding the Ctrl key down). I think this should be done by an array input (type 64) but I can't figure it out. Can anyone help me here? Thank you very much. Herman |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define array of sheets by inputbox
The application.InputBox will allow selection of ranges, but it won't
support selecting sheets. You can put up a userform with a listbox (set for multiselect) or separate checkboxes with the sheets listed and let the user select from there. -- Regards, Tom Ogilvy "Herman" wrote in message m... Hello I'm editing a procedure to copy certain sheets TOGETHER from Workbook A to Workbook B. In book A the user will be asked to click his way to book B. I know how to do that. But with book B activated an inputbox should prompt for the sheets to be copied together (selecting while holding the Ctrl key down). I think this should be done by an array input (type 64) but I can't figure it out. Can anyone help me here? Thank you very much. Herman |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define array of sheets by inputbox
Another option is to weasel and just have the user select the sheets first
before invoking your code: Option Explicit Sub testme01() Dim resp As Long If ActiveWindow.SelectedSheets.Count = 1 Then resp = MsgBox(prompt:="You only have one sheet selected." _ & vbLf & "Do you want to continue?", _ Buttons:=vbYesNo) If resp = vbNo Then MsgBox "Please Group multiple sheets and try again" Exit Sub End If End If ActiveWindow.SelectedSheets.Copy _ befo=Workbooks("otherworkbook.xls").Worksheets( 1) End Sub Herman wrote: Hello I'm editing a procedure to copy certain sheets TOGETHER from Workbook A to Workbook B. In book A the user will be asked to click his way to book B. I know how to do that. But with book B activated an inputbox should prompt for the sheets to be copied together (selecting while holding the Ctrl key down). I think this should be done by an array input (type 64) but I can't figure it out. Can anyone help me here? Thank you very much. Herman -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inputbox type 64 (array) | Excel Discussion (Misc queries) | |||
Define a sheet in an array using a cell value | Excel Worksheet Functions | |||
Inputbox - Dynamic Array? | Excel Programming | |||
Define an array with variable size | Excel Programming | |||
Pulling Array from InputBox | Excel Programming |