Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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
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
Fill a word form clicking on an excel cell Denis Excel Worksheet Functions 1 August 26th 08 11:34 PM
Clicking on cell asek71 Excel Discussion (Misc queries) 2 August 1st 08 06:43 PM
clicking all the way to another cell jcheko Excel Worksheet Functions 5 April 25th 08 09:04 PM
Colour by clicking cell ronoee New Users to Excel 12 January 29th 07 12:07 AM
can we start form by clicking hiperlink ? Konrad[_4_] Excel Programming 1 October 27th 03 07:45 PM


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