Hi there,
Total VBA newbie here. I'm creating an accounts ledger spreadsheet and have created 3 user forms: Add Invoice, Add Current Expense, Add Future Expense. I did 'Add Current Expense' first and have a button in my spreadsheet which opens the relevant User Form. It worked totally fine. Have since created the other two forms, again each with their own button to open their respective User Forms. When testing this afternoon, both 'Add Future Expense' and 'Add Invoice' work fine but 'Add Current Expense' is giving me the error:
Ambiguous Name Detected: RunUserForm
This is the code for both opening the User Form (module)...
...and for my User Form (form)
End Sub
FYI, I added the "Private" bit after the problem occurred after reading around online and not understanding a thing I have the problem both with and without "Private" added.
Thanks in advance!
Total VBA newbie here. I'm creating an accounts ledger spreadsheet and have created 3 user forms: Add Invoice, Add Current Expense, Add Future Expense. I did 'Add Current Expense' first and have a button in my spreadsheet which opens the relevant User Form. It worked totally fine. Have since created the other two forms, again each with their own button to open their respective User Forms. When testing this afternoon, both 'Add Future Expense' and 'Add Invoice' work fine but 'Add Current Expense' is giving me the error:
Ambiguous Name Detected: RunUserForm
This is the code for both opening the User Form (module)...
Code:
Private Sub RunUserForm()
LedgerEntry.Show
End Sub
Code:
Private Sub Enter_Click()
Dim lngRow As Long
Worksheets("Ledger").Activate
lngRow = Worksheets("Ledger").Range("B1048576").End(xlUp).Row + 1
Cells(lngRow, 2) = CEDate.Value
Cells(lngRow, 6) = CESupplier.Value
Cells(lngRow, 9) = CEAccount.Value
Cells(lngRow, 17) = CECredit.Value
CEDate.Value = ""
CESupplier.Value = ""
CEAccount.Value = ""
CECredit.Value = ""
End Sub
Private Sub UserForm_Click()
End Sub
FYI, I added the "Private" bit after the problem occurred after reading around online and not understanding a thing I have the problem both with and without "Private" added.
Thanks in advance!