Een familie van Microsoft-spreadsheetsoftware met hulpmiddelen voor het analyseren, in kaart brengen en communiceren van gegevens.
Thanks for sharing the details, Henk! You're very close, the main issue is where and how you declare your public variable.
You must put Public declarations in a standard module, not inside the ThisWorkbook object or a worksheet module, otherwise it will be private to that object and inaccessible elsewhere.
So insert a module, then enter this:
' Module1
Option Explicit
Public sMuis As Integer
Then, in your ThisWorkbook code, you can set or use that variable when the workbook opens:
' ThisWorkbook
Option Explicit
Private Sub Workbook_Open()
sMuis = 10 ' or any value you want
Sheets("Home").Select
End Sub
See if this helps. If you need further assistance just let me know.
Best regards,
Kimberly