path error when pointing/going to userform1

P

pswanie

i got a workbook with about 5 userforms and 10 modules

used to work but. in workbook open event i hide workbook and show userform1.

if i comment out userform1 the workbook open fine. if not it says path error.

any time that i want to show or load userform1 i get the error.

got it narrowed down to when ever i point/go to userform1

this is what i got in userfrom1


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''



Private Sub CommandButton4_Click()
Application.Visible = True

Unload UserForm1
Sheets("Sheet1").Select
ActiveWorkbook.Save
Application.Quit
End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub CommandButton5_Click()
Unload UserForm1
UserForm1.Show
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Private Sub UserForm_activate()

'UserForm1.TextBox1.Value = ""
'UserForm1.CheckBox1.Value = False
'UserForm1.CheckBox2.Value = False
'UserForm1.CheckBox3.Value = False
'UserForm1.CheckBox4.Value = False
'UserForm1.CheckBox5.Value = False

End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub UserForm_Initialize()

Me.TextBox1.Value = ""
Me.CheckBox1.Value = False
Me.CheckBox2.Value = False
Me.CheckBox3.Value = False
Me.CheckBox4.Value = False
Me.CheckBox5.Value = False
Call check4internet

End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'prevent user clicking red "x"
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''




Private Sub CommandButton1_Click()

If TextBox1 = "" Then
MsgBox "Please enter a description"
Else

Sheet1.Range("E1").Select
ActiveCell.FormulaR1C1 = "=username()"



If Worksheets("sheet1").Range("H30").Value = True Then


MsgBox "Ensure to select YES on the next security screen"
'Application.Visible = True


Call Mail_Selection_Range_Outlook_Body
Sheet1.Range("k4:k8").Select
Selection.Clear





Unload UserForm1
ActiveWorkbook.Save
Application.Quit


Else

MsgBox "Network cable unpluged/faulty" & vbNewLine & vbNewLine & _
"Use the page that print to fax to 000 000 0000"


Application.Sheets(Sheet1).PrintOut
Unload UserForm1
ActiveWorkbook.Save
Application.Quit


End If

End If


End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub CommandButton3_Click()

UserForm1.Hide
UserForm2.Show

End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
P

pswanie

i copied all the things on the userform. renamed it and inserted a new
userform. paste all things back. and copy and paste all code behind userform

now it crash on userform3

for some reason my code seems unreliable out of the blue.

as far as i know there is no funny code anywhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top