Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops, forgot to edit: in the second function, substitute
With wkSht.Range(rng.Address) 'do something, presumably End With For wkSht.Range(rng.Address).Select In article , JE McGimpsey wrote: One way: To select "rng on the activesheet": Dim rng As Range On Error Resume Next 'in case user clicks Cancel Set rng = Application.InputBox(Prompt:="prompt:", Type:=8) On Error GoTo 0 If Not rng Is Nothing Then _ ActiveSheet.Range(rng.Address).Select Not sure how that squares with your wanting "to select C8 on each sheet using a for each statement", which would be more like: Dim wkSht As Worksheet Dim rng As Range On Error Resume Next 'in case user clicks Cancel Set rng = Application.InputBox(Prompt:="prompt:", Type:=8) On Error GoTo 0 If Not rng Is Nothing Then For Each wkSht In Worksheets wkSht.Range(rng.Address).Select 'do something, presumably Next wkSht End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
InputBox Help | Excel Discussion (Misc queries) | |||
InputBox with VBA | Excel Discussion (Misc queries) | |||
InputBox | Excel Discussion (Misc queries) | |||
InputBox | Excel Discussion (Misc queries) | |||
inputbox | Excel Programming |