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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

priya_anthony

Board Regular
Joined
Jul 17, 2007
Messages
64
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
 

zzjasonzz

Well-known Member
Joined
Apr 23, 2006
Messages
649
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
 

priya_anthony

Board Regular
Joined
Jul 17, 2007
Messages
64
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
 

Forum statistics

Threads
1,181,649
Messages
5,931,214
Members
436,784
Latest member
amuljono

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
Top