Question
January 20, 2008 at 05:24 AM
adenbutter

automatically execute a macro in excel

by adenbutter . Updated 18 years, 10 months ago

hi,
how can i automatically run a macro, in other words the document must be opened without the enable/disable macro dialog. it has the code as mentioned below. i am totally new in excel, so i hope you guys/girls can help me.
thanks
anja

Private Sub Workbook_Open()
Dim Naam As String
Naam = Environ(“username”)
Range(“A1”).Value = Naam
End Sub

This discussion is locked

All Comments