ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   on cell enter.. (https://www.excelbanter.com/excel-programming/293462-cell-enter.html)

paul[_15_]

on cell enter..
 
Hi, I'm using XL 2000

I need to load UserForm1 when a user makes a worksheet cell A1 active.

The Userform returns a value to the Active cell which is why i need the cell
entered to call the userform.

Any ideas appreciated.

Thanks, Paul



JE McGimpsey

on cell enter..
 
One way:

Put this in your worksheet code module (right-click on the worksheet tab
and choose View Code):

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim myForm As UserForm1
If ActiveCell.Address(False, False) = "A1" Then
Set myForm = New UserForm1
myForm.Show
End If
End Sub



In article <FzL1c.478$re1.235@newsfe1-win,
"paul" wrote:

Hi, I'm using XL 2000

I need to load UserForm1 when a user makes a worksheet cell A1 active.

The Userform returns a value to the Active cell which is why i need the cell
entered to call the userform.

Any ideas appreciated.

Thanks, Paul



pikus

on cell enter..
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 1 Then
UserForm1.Show
End If
End Sub

- Piku

--
Message posted from http://www.ExcelForum.com


paul[_15_]

on cell enter..
 
The tip works fine.

Can I extend the active cell as a range.
For example A1:A50 ?

Thanks, Paul

"JE McGimpsey" wrote in message
...
One way:

Put this in your worksheet code module (right-click on the worksheet tab
and choose View Code):

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim myForm As UserForm1
If ActiveCell.Address(False, False) = "A1" Then
Set myForm = New UserForm1
myForm.Show
End If
End Sub



In article <FzL1c.478$re1.235@newsfe1-win,
"paul" wrote:

Hi, I'm using XL 2000

I need to load UserForm1 when a user makes a worksheet cell A1 active.

The Userform returns a value to the Active cell which is why i need the

cell
entered to call the userform.

Any ideas appreciated.

Thanks, Paul





JE McGimpsey

on cell enter..
 
In that case I'd use something like:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim myForm As UserForm1
With Target
If .Count 1 Then Exit Sub
If Not Intersect(.Cells, Range("A1:A50) Is Nothing Then
Set myForm = New UserForm1
myForm.Show
End If
End With
End Sub




In article <KNO1c.1231$m56.435@newsfe1-win,
"paul" wrote:

The tip works fine.

Can I extend the active cell as a range.
For example A1:A50 ?


Paul

on cell enter..
 
Perfect. Thank you.

-----Original Message-----
In that case I'd use something like:

Private Sub Worksheet_SelectionChange(ByVal Target As

Excel.Range)
Dim myForm As UserForm1
With Target
If .Count 1 Then Exit Sub
If Not Intersect(.Cells, Range("A1:A50) Is

Nothing Then
Set myForm = New UserForm1
myForm.Show
End If
End With
End Sub




In article <KNO1c.1231$m56.435@newsfe1-win,
"paul" wrote:

The tip works fine.

Can I extend the active cell as a range.
For example A1:A50 ?

.



All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com