Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop up a Form when Clicking a Cell
I have a worksheet and what I want is that when one clicks a row, a popup
form will show up, displaying the data from that row in a more user friendly screen. The worksheet will be generated programatically and could have thousands of rows. How can I link the row / cell to a form? Is it possible not to use a worksheet control? I hope it will be simple enough so that when the form shows up, I can calculate what row was selected in the sheet? Any help will be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop up a Form when Clicking a Cell
It would be easier to accomplish with a double-click, as there is no Click
event for a worksheet. You could use the SelectionChange method, but I don't think that would accomplish exactly what you want. Add UserForm1 to your project and then put the following code into the worksheet's code module: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Cancel = True UserForm1.Show End Sub Of course, you would need to add the appropriate Label or TextBox controls to the UserForm to display the contents of the row, and write the code to populate them. Also, you would lose the normal double-click functionality (in-cell editing). -- Vasant "WK" wrote in message ... I have a worksheet and what I want is that when one clicks a row, a popup form will show up, displaying the data from that row in a more user friendly screen. The worksheet will be generated programatically and could have thousands of rows. How can I link the row / cell to a form? Is it possible not to use a worksheet control? I hope it will be simple enough so that when the form shows up, I can calculate what row was selected in the sheet? Any help will be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill a word form clicking on an excel cell | Excel Worksheet Functions | |||
Clicking on cell | Excel Discussion (Misc queries) | |||
clicking all the way to another cell | Excel Worksheet Functions | |||
Colour by clicking cell | New Users to Excel | |||
can we start form by clicking hiperlink ? | Excel Programming |