Question : Want to open form when file opens, but getting file/access error 75 message

I have a workbook with a form (named "frmFrtPg1") that opens just fine from a button on a spreadsheet (I'm using VBA). However, if put code in the ThisWorkbook module so the workbook opens to the form, I keep getting a "Path/File access error" message, followed by "Run-time error '75'" Could not find the specified object."

Public Sub Workbook_Open()
    frmFrtPg1.Show
End Sub

It's like it doesn't know where the form is, but yet it works from a commandbutton on the worksheet.

I thought this would be such a simple matter, but I'm stymied. Please help.

--elizabeth

Answer : Want to open form when file opens, but getting file/access error 75 message

Hi baker eliz,

are you sure you don't have a typo in the form name? It should normally work like this.

NB, is there a particular reason you declare the Sub Public?

It didn't make a difference in my test, but normally the events are Private.

Try calling your form from another macro, lets say OpenForm, and if you get that working, call OpenForm from the Workbook_Open event

hope that helps

teylyn

Random Solutions  
 
programming4us programming4us