Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to instruct the user to select a worksheet to work on and then I'll
identify it as WS1 or WS2. How would I do this? Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about something like this. Place a ComboBox (from the control toolbox) on
a sheet and add the following code... You will probably want to clean it up a bit but it allows the user to select a sheet and you can then capture the sheet name... Public wksSelected As Worksheet Private Sub ComboBox1_Change() If ComboBox1.Text < "" Then Set wksSelected = Sheets(ComboBox1.Text) wksSelected.Select End If End Sub Private Sub ComboBox1_GotFocus() Dim wks As Worksheet With ComboBox1 .Clear For Each wks In Worksheets If wks.Name < Me.Name Then .AddItem wks.Name Next wks End With End Sub -- HTH... Jim Thomlinson "Barb Reinhardt" wrote: I'd like to instruct the user to select a worksheet to work on and then I'll identify it as WS1 or WS2. How would I do this? Thanks, Barb Reinhardt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dim rng As Range Set rng = Application.InputBox("Select a range (any range) on the target sheet?", Type:=8) If Not rng Is Nothing Then Set WS1 = rng.Parent End If -- --- HTH Bob __________________________________________ UK Cambridge XL Users Conference 29-30 Nov http://www.exceluserconference.com/UKEUC.html (there's no email, no snail mail, but somewhere should be gmail in my addy) "Barb Reinhardt" wrote in message ... I'd like to instruct the user to select a worksheet to work on and then I'll identify it as WS1 or WS2. How would I do this? Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking a worksheet, but allowing user to add rows in a table | Excel Worksheet Functions | |||
Allowing user to locate and select a file and save results in stri | Excel Programming | |||
Allowing user to select a cell in another workbook in VBA | Excel Programming | |||
Allowing the user to specify save location | Excel Programming | |||
Allowing User to save file | Excel Programming |