bloodmilksky
Board Regular
- Joined
- Feb 3, 2016
- Messages
- 202
Hi Guys,
I am using the below upon opening the workbook and have assigned both subs to the Workbook and not sheets.
everytime i open the workbook i get a run time error 1004 saying that either the macros are disabled or the sub isnt available in this workbook.
does anyone know how I could resolve this?
many thanks
jamie
I am using the below upon opening the workbook and have assigned both subs to the Workbook and not sheets.
everytime i open the workbook i get a run time error 1004 saying that either the macros are disabled or the sub isnt available in this workbook.
does anyone know how I could resolve this?
many thanks
jamie
Code:
Private Sub Workbook_Open()
Run "Would_You_Like_To_Place_An_Order"
End Sub
Sub Would_You_Like_To_Place_An_Order()
Dim myValue As Variant
Msg = "Would You Like To Place An Order ? " & Application.UserName
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.Quit
End If
If Ans = vbYes Then myValue = InputBox("Please enter Account Number Or Postcode")
Sheets("Menu").Select
Range("ADDRESSREF") = myValue
End Sub