Error message when MsgBox start when Excel starts

KlausW

Active Member
Joined
Sep 9, 2020
Messages
453
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have a little challenge.
I inserted the VBA code I found on the web into this workbook to make the MsgBox start when Excel starts.
But I for this error message.
VBA Error wrong number of arguments or invalid property assignment
But don't know how to fix the error.
Some who can help.
Any help will be appreciated
Best Regards
Klaus W

VBA Code:
Option Explicit

Private Sub Workbook_Open()

MsgBox "Autorun works!"

'your code here

End Sub
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
There is nothing wrong with that code. The only way I can see that causing that error is if you have written your own MsgBox routine in the same workbook.
 
Upvote 0
Also, are you sure that the issue is not with the part you are leaving out?
(under "your code here")?
 
Upvote 0
Thanks to you both, it was fixed, don't know how. Good day ;)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top