Macros

priya_anthony

Board Regular
Joined
Jul 17, 2007
Messages
64
Hi experts Really need your help

What the requirement is when a cell is active in a particular column
and the user presses the Shift and F4 to gether then a user form should be displayed

Eg: if the column name is students then if a cell is active from that column and the user presses the Shift and F4 together then a form for students should be displayed
this applies to the other columns too
Please help..........

priya
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
macros

In the first place, a user form should be created. Have you done that?

Yes the user form is created needs to display that form on to the excel sheet when Shift and F4 is pressed
that is where i have stucked up

So kindly help
 
Upvote 0
right click on sheet tab double click on ThisWorkbook on the far left under microsoft excel objects then paste:

Code:
Private Sub Workbook_Open()
Application.OnKey "+{F4}", "yourmacro"
End Sub

then rightclick on thisworkbook and Insert > Module then put this in it
Code:
Sub yourmacro()
If Selection.Column = 1 Then
    userformname.Show
End If
End Sub

do all the error checking (like making sure it is the right column, right sheet etc) in yourmacro

you should be able to work it out from that
 
Upvote 0
Thank you very much for your help i have just tried a dummy of it it really works
just need to integrate on to the project

Once again thank you very much for your help
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top