Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default How to activate a User Form

Hi,
I would like to activate a User Form with text box when a range of values
meets specific criteria.

Assuming B3 to B26 is the active range with values and the range A3 to A26
contains text with three letters in each cell.

At the moment the code to activate the User Form looks like this:

Sub CheckVolumeRise2 ()
If ActiveCell < ActiveCell.Offset(0, 2) And ActiveCell.Offset(0, 2) < _
ActiveCell.Offset(0, 4) Then
ActiveCell.Offset(0, 2).Activate
CriteriaReached.Show
Else
ActiveCell.Offset(0, 2).Activate
End If
StartTimer
End Sub

The User Form Text Box code looks like this:

Private Sub UserForm_Initialize()
CriteriaReached.TextBox1. _
Text = ThisWorkbook.Worksheets(1).Range("a6").Value
End Sub

At the moment the User Form (named CriteriaReached) Text Box will only show
ADO which is the three letters in cell A6.

What I am trying to achieve, is that if for example, the criteria was
reached in row 13 then the User form would activate and the text in cell A13
which might be AAO would show in the text box of the User Form. Or if
multiple rows reached the criteria at the same time for example rows 9 ,12
and 25 the text box would show something like this AAI, AAM, ABV.

I would appreciate any help I can get on this.

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default How to activate a User Form

Hi

Thy this:

Private Sub UserForm_Initialize()
CriteriaReached.TextBox1. _
Text = ThisWorkbook.Worksheets(1).Range("A" & ActiveCell.Row).Value
End Sub

Regards,
Per


"Rob" skrev i meddelelsen
...
Hi,
I would like to activate a User Form with text box when a range of values
meets specific criteria.

Assuming B3 to B26 is the active range with values and the range A3 to A26
contains text with three letters in each cell.

At the moment the code to activate the User Form looks like this:

Sub CheckVolumeRise2 ()
If ActiveCell < ActiveCell.Offset(0, 2) And ActiveCell.Offset(0, 2) < _
ActiveCell.Offset(0, 4) Then
ActiveCell.Offset(0, 2).Activate
CriteriaReached.Show
Else
ActiveCell.Offset(0, 2).Activate
End If
StartTimer
End Sub

The User Form Text Box code looks like this:

Private Sub UserForm_Initialize()
CriteriaReached.TextBox1. _
Text = ThisWorkbook.Worksheets(1).Range("a6").Value
End Sub

At the moment the User Form (named CriteriaReached) Text Box will only
show
ADO which is the three letters in cell A6.

What I am trying to achieve, is that if for example, the criteria was
reached in row 13 then the User form would activate and the text in cell
A13
which might be AAO would show in the text box of the User Form. Or if
multiple rows reached the criteria at the same time for example rows 9 ,12
and 25 the text box would show something like this AAI, AAM, ABV.

I would appreciate any help I can get on this.

Thank you.

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
Trying to get a User Form to activate off a drop down menu Rcarper Excel Discussion (Misc queries) 2 October 2nd 09 02:04 PM
Date field in user form & Loading a user form on opening workbook Balan Excel Programming 1 May 24th 08 03:40 PM
Can a TextBox on a user form activate a popup calander for dat JohannM Excel Programming 0 September 8th 06 09:36 AM
Activate user form upon condition fishergomz Excel Programming 2 May 6th 04 03:36 PM
Activate Excel worksheet after showing a user form ? KajBre Excel Programming 5 January 24th 04 03:56 PM


All times are GMT +1. The time now is 02:14 AM.

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"