Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get user selected range into RefEdit

I've created a calendar on which a teacher will select a range of
class periods (vertical cells) for which he/she wants to reserve a
laptop computer cart. When they select my custom menu item a form will
pop up with list boxes to indicate the teacher's name, room number,
and building, as well as a refedit control.

I would like to have the RefEdit control field show the range that the
teacher has already selected. (The teacher may then accept the range
that was pre-selected, or may change his/her mind to select another
range.)

The spreadsheet is called "Laptop Schedule.xls". There are 13 sheets
(one for each month and one for lists of teachers' names, room numbers
and building names for the above form.

I know only enough VBA to be quite dangerous, so please go easy!
Thanks...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Get user selected range into RefEdit

Perhaps something like:

Private Sub UserForm_Activate()
If TypeName(Selection) = "Range" Then RefEdit1 = Selection.Address
End Sub

--

Vasant


"J. Hall" wrote in message
om...
I've created a calendar on which a teacher will select a range of
class periods (vertical cells) for which he/she wants to reserve a
laptop computer cart. When they select my custom menu item a form will
pop up with list boxes to indicate the teacher's name, room number,
and building, as well as a refedit control.

I would like to have the RefEdit control field show the range that the
teacher has already selected. (The teacher may then accept the range
that was pre-selected, or may change his/her mind to select another
range.)

The spreadsheet is called "Laptop Schedule.xls". There are 13 sheets
(one for each month and one for lists of teachers' names, room numbers
and building names for the above form.

I know only enough VBA to be quite dangerous, so please go easy!
Thanks...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Get user selected range into RefEdit

Assuming a RefEdit called "RefEdit1", in the code for the userform, try:

Private Sub UserForm_Activate()
RefEdit1.Text = Selection.Address
End Sub



J. Hall wrote:
I've created a calendar on which a teacher will select a range of
class periods (vertical cells) for which he/she wants to reserve a
laptop computer cart. When they select my custom menu item a form will
pop up with list boxes to indicate the teacher's name, room number,
and building, as well as a refedit control.

I would like to have the RefEdit control field show the range that the
teacher has already selected. (The teacher may then accept the range
that was pre-selected, or may change his/her mind to select another
range.)

The spreadsheet is called "Laptop Schedule.xls". There are 13 sheets
(one for each month and one for lists of teachers' names, room numbers
and building names for the above form.

I know only enough VBA to be quite dangerous, so please go easy!
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
Referring to a user-selected range James Mc Excel Programming 2 January 27th 04 07:46 AM
Identify User Selected Range RonF Excel Programming 3 January 12th 04 04:36 PM
Identify Range Selected By User RonF Excel Programming 1 January 9th 04 05:29 PM
Refresh label on user form with RefEdit John Tjia Excel Programming 2 January 6th 04 10:12 PM
Determining end of user-selected range Syed Faisal Excel Programming 2 October 23rd 03 05:22 PM


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