Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inputbox type 64 (array) pete the greek Excel Discussion (Misc queries) 8 May 20th 23 11:44 AM
Define a sheet in an array using a cell value VDU Excel Worksheet Functions 2 November 15th 07 02:00 PM
Inputbox - Dynamic Array? Alex Excel Programming 5 October 19th 04 09:49 PM
Define an array with variable size Yiu Choi Fan Excel Programming 3 July 9th 04 11:29 AM
Pulling Array from InputBox cogent Excel Programming 1 April 27th 04 08:36 AM


All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"