Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone show me how to code the conditional statement shown in the
comments below i.e. how to put the "x" in the cell only if the SHIFT ( or ctrl or alt)key is selected. Private Sub Worksheet_SelectionChange(ByVal Target As Range) RowPos = Target.Row ColPos = 3 ' If Shift Key selected then ' Put an "x" in cell row = RowPos and Column = ColPos ThisWorkbook.ActiveSheet.Cells(RowPos, ColPos) = "x" 'End If End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is this code you got from somewhere or a guess on how it might look? I think it would be better is you explained exactly what you want to do and to what range because if you put an X into a cell everytime you move the cursor with the SHIFT ALT or CTRL key down you may get some unpleasent supprises. -- Thanks, Shane Devenshire "dwinmac" wrote: Can someone show me how to code the conditional statement shown in the comments below i.e. how to put the "x" in the cell only if the SHIFT ( or ctrl or alt)key is selected. Private Sub Worksheet_SelectionChange(ByVal Target As Range) RowPos = Target.Row ColPos = 3 ' If Shift Key selected then ' Put an "x" in cell row = RowPos and Column = ColPos ThisWorkbook.ActiveSheet.Cells(RowPos, ColPos) = "x" 'End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find keyboard short-cut to type symbols on keyboard | Excel Discussion (Misc queries) | |||
reading from SQL | Excel Discussion (Misc queries) | |||
Reading XML | Excel Discussion (Misc queries) | |||
reading xls from asp | Excel Programming | |||
sub for reading | Excel Programming |