I'm developing a small Excel VBA application with 2 user forms for my business but have hit a snag: I keep getting a 'Run-time error 70 Permission Denied' when the code attempts to perform an AddItem to any of the combo boxes on the second form. It doesn't do it on the first form - only when I invoke the second form from the first.
The application consists of a number of sheets and 2 user forms (Orders and Sessions). The user experience is as follows:
1. Click on the Order Form button on the Orders sheet [the Order form opens]
2. Click on the Sessions button at the top of the form [the Permission denied' error displays]
Debugging the code it fails in the Sessions form code
'Populate combo box "Clients"
For x = 3 To .Cells(1048576, 2).End(xlUp).Row
m .Cells(x, 2)
This is strange because I have the same code in the Orders form module and it works fine ! So I'm sure it's something simple I've overlooked.
I've attached the application.
Thanks in anticipation