LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Need help changing Range

Hey guys,

I got it. Heres what I used. Thank you both for your
replys.

Worksheets(4).Range("J2:J101").Value = ""
Dim Rng As Range
Dim Ndx As Long
Set Rng = Worksheets(4).Range("J2")
With Me.ListBox1
For Ndx = 0 To .ListCount - 1
If .Selected(Ndx) = True Then
Rng.Value = .List(Ndx)
Set Rng = Rng(2, 1)
End If
Next Ndx
End With
Unload Me
End Sub


-----Original Message-----
Below is a working code... Instead of the range being
IV1:IV100 I would like for the range to be on worksheets
(4) J2:J101.

Currently it is looking on the active sheet which is
sheet1. I am not sure what to do with line " Set Rng

=
Range("IV1")"

Private Sub CommandButton58_Click()
'Applies the highlight settings to sheet Team Data
'Will highlight data as far as Column IV and as far down
as Row 100

Range("IV1:IV100").Value = ""
Dim Rng As Range
Dim Ndx As Long
Set Rng = Range("IV1")
With Me.ListBox1
For Ndx = 0 To .ListCount - 1
If .Selected(Ndx) = True Then
Rng.Value = .List(Ndx)
Set Rng = Rng(2, 1)
End If
Next Ndx
End With
Unload Me
End Sub

thanx in advance.

Todd
.

 
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
Changing the range for averages with out changing the formula. JessLRC Excel Worksheet Functions 0 April 20th 10 03:10 PM
Sum first five vaules of changing range Lou Excel Discussion (Misc queries) 4 October 15th 07 01:37 PM
Deleting or changing a range name Dan Excel Discussion (Misc queries) 3 April 21st 06 10:53 PM
calculating in a changing range gkaste Excel Discussion (Misc queries) 5 August 8th 05 09:49 PM
changing a range of fields Mr. G. Excel Discussion (Misc queries) 3 January 31st 05 09:21 PM


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

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

About Us

"It's about Microsoft Excel"