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: 343
Default How to reference a range from a UserForm

I would like to put this code in a module outside of UserForm1 but the
module stops when it gets to rng1(1, 6).

The UserForm is displayed when the code is run and there is a line:

Dim rng1 As Range

in the General Declaration area of the UserForm, and I have the following:

Set rng1 = Cells(ActiveCell.Row, 1)

which run prior to calling the routine below.



Sub TextBoxData()

'No Show 1

UserForm1.TextBox2202.Value = rng1(1, 6)
'Date of No Show
UserForm1.TextBox2202.Value = Format$(UserForm1.TextBox2202.Value,
"ddd dd mmm yy")
UserForm1.TextBox2203.Value = rng1(1, 7)

End Sub

 
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
Command button calculation from Userform and Cell reference SDH Excel Programming 6 April 18th 07 08:59 AM
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Cell reference to userform Jens Peter Nielsen Excel Programming 1 July 15th 05 11:25 PM
Reference a cell in a worksheet from a userform Adam Excel Programming 1 March 2nd 05 07:41 PM
Userform cell reference help Pete Excel Programming 2 January 28th 04 02:20 PM


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