Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping Problem
I am trying to resolve a problem for one of the directors at work. I am
attempting to place the value in €˜rRange in each Z1 cell in each sheet in the workbook. I think I am pretty close, but I just cant get the For-Next looping part right. All attempts have been futile up to this point. Any help would be greatly appreciated. Sub StartHere() Dim rRange As Range On Error Resume Next Application.DisplayAlerts = False Set rRange = Application.InputBox(Prompt:= _ "Please select a range with your Mouse to be bolded.", _ Title:="SPECIFY RANGE", Type:=8) Application.DisplayAlerts = True Dim ws As Worksheet For Each ws In Sheets If ws.Visible Then ws.Select (False) Range("Z1").Value = rRange Next On Error GoTo InValidEntry InValidEntry: If Err = 13 Then MsgBox "Not a valid input. " & "Please retry." End If End Sub -- RyGuy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping Problem | Excel Programming | |||
Looping problem........ | Excel Programming | |||
Looping problem | Excel Programming | |||
If Then Else looping problem | Excel Programming | |||
Looping Problem | Excel Programming |