LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default Reading the keyboard in VBA

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

 
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
find keyboard short-cut to type symbols on keyboard steamcomputerdriver Excel Discussion (Misc queries) 2 February 6th 10 01:58 PM
reading from SQL Texas Tonie[_2_] Excel Discussion (Misc queries) 0 November 9th 07 10:59 PM
Reading XML Ajit Excel Discussion (Misc queries) 1 October 2nd 07 10:54 PM
reading xls from asp mrweb Excel Programming 0 October 20th 03 08:54 PM
sub for reading Fernando Duran Excel Programming 4 September 15th 03 07:52 PM


All times are GMT +1. The time now is 06:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"