Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range question


And to update....

I'd like range A1 through AQ188 - how do I pass that into a range?
These values are dynamic and can change at any time.

Thanks

--
stratagur
-----------------------------------------------------------------------
strataguru's Profile: http://www.excelforum.com/member.php...nfo&userid=131
View this thread: http://www.excelforum.com/showthread.php?threadid=26337

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Range question

You would specify the maximum row number (188) and column number (whatever AQ
is -- I don't know off hand) as arguments and substitute these for X in a
statement like Rnd()*X


On Wed, 6 Oct 2004 17:52:59 -0500, strataguru
wrote:


And to update....

I'd like range A1 through AQ188 - how do I pass that into a range?
These values are dynamic and can change at any time.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Range question

Hi: Stataguru

Not to sure where you are with this or what you want to
to accomplish. The following will place the cellpointer
randomly in the location you indicated.

Private Sub CommandButton1_Click()

Dim cnum As Integer
Dim rnum As Integer

'/ generate a random number up to n
'/ change the (Rnd * n) to encrease
'/ the random output dimension
Randomize
cnum = Int(Rnd * 43 + 1)
rnum = Int(Rnd * 188 + 1)

MsgBox "The column number is " & cnum & " and the" _
& " row number is " & rnum & ".", , "Good Luck TK"

Worksheets("Sheet1").Cells(rnum, cnum).Select

End Sub

Good Luck
TK

On Wed, 6 Oct 2004 17:52:59 -0500, strataguru
wrote:


And to update....

I'd like range A1 through AQ188 - how do I pass that into a range?
These values are dynamic and can change at any time.

Thanks!



Reply
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
Range question strataguru[_19_] Excel Programming 2 September 25th 04 12:57 AM
Used Range Question a Excel Programming 2 May 26th 04 03:45 AM
set range question David Goodall Excel Programming 1 February 23rd 04 02:12 AM
If Range.Name question Otto Moehrbach[_5_] Excel Programming 8 November 30th 03 11:05 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


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