Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 ? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 ? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup if #N/A then enter enter data in cell I4 | Excel Discussion (Misc queries) | |||
Enter multiple numbers in a cell so total shows when enter keypres | Excel Worksheet Functions | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
How to point to (select) a cell to the left from a cell where I enter the = equal sign? | Excel Discussion (Misc queries) | |||
how do I enter a RETURN (Enter) in a cell in EXCEL2003 | Excel Discussion (Misc queries) |