Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi guys, I have a spreadsheet, with a grid on it. What i woudl like to do, is every time a user of the file clicks ona particular cell in the grid it runs a piece of code (mainly an input box). Is there anyway to do this so it is automatic, whcih out having to press a button? Cheers Fernando -- Fernandoalberte ------------------------------------------------------------------------ Fernandoalberte's Profile: http://www.excelforum.com/member.php...o&userid=24493 View this thread: http://www.excelforum.com/showthread...hreadid=383130 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Fernando, Yes there is. By using the Worksheet_SelectionChange Event. Some example code is shown below: Code: -------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) Select Case Target.Address Case Insulation_Type_Address Call Set_Insulation_Drop_Down(Target) Case Thickness_Address Call Set_Thickness_Drop_Down(Target) Case Outlet_Type_Address Call Set_Outlet_Type_Drop_Down(Target) Case Outlet_Size_Address Call Set_Outlet_Size_Validation(Target) End Select Call Check_Data_Entry(Target) End Sub -------------------- The code above calls a different subroutine if the target address is the same as one of the ones specified in the case statement and then runs the CHECK_DATA_ENTRY subroutine for all cells. Regards Rich -- Rich_z ------------------------------------------------------------------------ Rich_z's Profile: http://www.excelforum.com/member.php...o&userid=24737 View this thread: http://www.excelforum.com/showthread...hreadid=383130 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is great just what i need, but i am not sure i follow the code. Which bits would i need to change if i wanted the code to run different sub routines if i select cell "a1" vs if i select cell "b1"? Sorry to be a pain. Fernando -- Fernandoalberte ------------------------------------------------------------------------ Fernandoalberte's Profile: http://www.excelforum.com/member.php...o&userid=24493 View this thread: http://www.excelforum.com/showthread...hreadid=383130 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating XL links in VBA code | Excel Programming | |||
Any way to update links tru VBA code? | Excel Programming | |||
Does workbook contain code and links | Excel Programming | |||
VBA Code for Links to Excel workbooks | Excel Programming | |||
Code for existing links | Excel Programming |