TRLOS
10-15-2013, 04:21 AM
Its been many many years since I've done VB Scripting, so I apologize if this is a simple noob question.
I have created a type of form on Excel which will be used on a touch screen tablet.
I need 2 VBA scripts please.
I have used 2 worksheets. The first is the main form. The second worksheet is where I have a bunch of Data Values which are used in Data Validation Drop Down boxes.
Script 1 :
I have created a Drop Down List in Cell F16. At current, when you select F16, I can see the small arrow to the right of the cell so when you click on it, it pulls the Drop Down box down so you can select a value.
My question is, what is the VBA script so that when I select that particular cell, it opens the Drop Down list automatically (ALT+Down Arrow) ?
Can you make it that you can use the same script for the following 10 cells below the first one ?
I have found a similar code but have no idea how to change it to do what I want
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
(What goes here to automatically open the Drop Down Box......ALT+Down Arrow.....)
End If
End Sub
(Is this the right script or is there another better suited?)
Script 2 :
I have created a Date Picker Calendar (the same as specified on this site 'fontstuff.com/excel/exltut03.htm)
I have added the following in VBA so that it inserts the Selected Date in the Highlighted Cell
Private Sub DTPicker1_Change()
ActiveCell.Value = Me.DTPicker1.Value
End Sub
Is there a way to automatically open the Date Picker when any cell from J16 - M38 is selected ?
The reason I want these scripts is because this Excel sheet will primarily be used on a touch screen, so would make it easier to use by Single-Tapping on the cell and have it automatically open the relevant areas (Drop Down Box & Date Picker)
Any help would be greatly appreciated.
Thanks in Advance
I have created a type of form on Excel which will be used on a touch screen tablet.
I need 2 VBA scripts please.
I have used 2 worksheets. The first is the main form. The second worksheet is where I have a bunch of Data Values which are used in Data Validation Drop Down boxes.
Script 1 :
I have created a Drop Down List in Cell F16. At current, when you select F16, I can see the small arrow to the right of the cell so when you click on it, it pulls the Drop Down box down so you can select a value.
My question is, what is the VBA script so that when I select that particular cell, it opens the Drop Down list automatically (ALT+Down Arrow) ?
Can you make it that you can use the same script for the following 10 cells below the first one ?
I have found a similar code but have no idea how to change it to do what I want
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
(What goes here to automatically open the Drop Down Box......ALT+Down Arrow.....)
End If
End Sub
(Is this the right script or is there another better suited?)
Script 2 :
I have created a Date Picker Calendar (the same as specified on this site 'fontstuff.com/excel/exltut03.htm)
I have added the following in VBA so that it inserts the Selected Date in the Highlighted Cell
Private Sub DTPicker1_Change()
ActiveCell.Value = Me.DTPicker1.Value
End Sub
Is there a way to automatically open the Date Picker when any cell from J16 - M38 is selected ?
The reason I want these scripts is because this Excel sheet will primarily be used on a touch screen, so would make it easier to use by Single-Tapping on the cell and have it automatically open the relevant areas (Drop Down Box & Date Picker)
Any help would be greatly appreciated.
Thanks in Advance