Userform not initializing or activating

Godwin117

Board Regular
Joined
Dec 19, 2019
Messages
68
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am stuck and can't seem to find the answer or overlooked the answer. Below is the code for my module to show the userform. This part works correctly.
VBA Code:
Sub Log_Hours()

UserForm1.Show

End Sub

The Userform loads properly, until I change the Userform1 to Userform, not sure why. Then I am getting a Automation error. Below is that code.

VBA Code:
Private Sub UserForm1_Initialize()

Me.ComboBox1.List = WorksheetFunction.Transpose(Worksheets("Data Validation").Range("C2", Worksheets("Data Validation").Range("C" & Rows.Count).End(xlUp)))
Me.TextBox1.Value = "mm-dd-yyyy"

End Sub

Any help on this would be greatly appreciated.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
In that case I'm not sure.
Try deleting the combo & then adding a new one.
 
Upvote 0
You can't post the workbook here, but you can upload to a share site such as OneDrive, GoogleDrive & mark for sharing & then post the link you are given to the thread.
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top