So, first-off i'm still very new to userforms. A few months ago i had help applying a userform which appeared the moment i clicked a particular cell, not a button, using the following vba:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("G30,P30")) Is Nothing Then
Module4.OpenCalendar
End If
End Sub
I now have a new, separate userform i'd like to appear in the same manner, but i'm not sure how to apply it into the same worksheet. I've gotten nothing but errors in my multiple different tries, but here's the best i've got for now.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("G30,P30,Z30,AI30")) Is Nothing Then
If Intersect(Target, Range("G30,P30")) Then
Module4.OpenCalendar
End If
If Intersect(Target, Range("Z30,AI30")) Then
Module5.OpenTime
End If
End If
End Sub
Any help would be appreciated.
Also, is there anyway to single-click a userform listbox entry and apply the clicked value into the cell the userform opens from. I am able to do this with the calendar i have, i'm now trying to do the same thing with the time-picker i've created.
Thanks.
-HK
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("G30,P30")) Is Nothing Then
Module4.OpenCalendar
End If
End Sub
I now have a new, separate userform i'd like to appear in the same manner, but i'm not sure how to apply it into the same worksheet. I've gotten nothing but errors in my multiple different tries, but here's the best i've got for now.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("G30,P30,Z30,AI30")) Is Nothing Then
If Intersect(Target, Range("G30,P30")) Then
Module4.OpenCalendar
End If
If Intersect(Target, Range("Z30,AI30")) Then
Module5.OpenTime
End If
End If
End Sub
Any help would be appreciated.
Also, is there anyway to single-click a userform listbox entry and apply the clicked value into the cell the userform opens from. I am able to do this with the calendar i have, i'm now trying to do the same thing with the time-picker i've created.
Thanks.
-HK