I downloaded a Userform that is a Calendar that that is portable.
This can be downloaded here:
Excel VBA Date Picker
I am using an external monitor as an extended screen.
I have the following code in the Worksheet Selection Change area of code:
The problem is that the Calendar opens up on the wrong screen. Can someone figure out how to display the calendar below the selected cell? Or even hover over it?
I emailed the author but he wasn't able to assist me. His reply was:
You can use the PositionTop and PositionLeft arguments to change where the calendar shows up. You’d have to get the position of the range and calculate the top and left positions of the calendar based on that.
It gets a little tricky with multiple monitors, and I unfortunately don’t have an exact code sample to show you, but hopefully you can do some Googling and figure it out.
However, I tried to get it to work based on that but I couldn't figure it out. I can understand how to position Dropdown menus, pictures etc. But with this it is using the Calendar Userform as a function and I can't understand how to still use it as a function and still be able to position the calendar properly.
Any help would be greatly appreciated.
This can be downloaded here:
Excel VBA Date Picker
I am using an external monitor as an extended screen.
I have the following code in the Worksheet Selection Change area of code:
VBA Code:
If Not Intersect(Target, Range("B5")) Is Nothing Then
dateVariable = CalendarForm.GetDate
If dateVariable <> 0 Then
ThisWorkbook.Worksheets("Dashboard").Range("B5").value = dateVariable
End If
End If
If Not Intersect(Target, Range("C5")) Is Nothing Then
dateVariable = CalendarForm.GetDate
If dateVariable <> 0 Then
ThisWorkbook.Worksheets("Dashboard").Range("C5").value = dateVariable
End If
End If
The problem is that the Calendar opens up on the wrong screen. Can someone figure out how to display the calendar below the selected cell? Or even hover over it?
I emailed the author but he wasn't able to assist me. His reply was:
You can use the PositionTop and PositionLeft arguments to change where the calendar shows up. You’d have to get the position of the range and calculate the top and left positions of the calendar based on that.
It gets a little tricky with multiple monitors, and I unfortunately don’t have an exact code sample to show you, but hopefully you can do some Googling and figure it out.
However, I tried to get it to work based on that but I couldn't figure it out. I can understand how to position Dropdown menus, pictures etc. But with this it is using the Calendar Userform as a function and I can't understand how to still use it as a function and still be able to position the calendar properly.
Any help would be greatly appreciated.