LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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
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
Looping Problem GregR Excel Programming 0 September 26th 06 04:29 PM
Looping problem........ Steve Jones Excel Programming 1 September 22nd 06 04:31 PM
Looping problem Sleeping Bear Excel Programming 2 July 7th 05 07:41 PM
If Then Else looping problem Kieran1028[_12_] Excel Programming 1 November 11th 04 06:27 PM
Looping Problem Todd Huttenstine[_3_] Excel Programming 5 January 25th 04 12:51 AM


All times are GMT +1. The time now is 10:47 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"