Hi again,
I'm dealing with a new challenge and I need your help.
I'm saving only a sheet using the following code:
Application.ScreenUpdating = False
Worksheets("BULETIN").Select
Worksheets("BULETIN").Copy
ActiveSheet.Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ThisFile = Range("E13").Text & "-" & Range("A" & q).Value
Worksheets("BULETIN").SaveAs Filename:="Z:\blahblah\" & ThisFile & ".xls", FileFormat:=xlExcel8
Application.ScreenUpdating = True
ActiveWorkbook.Close
The question is: is there a way to put a vba code on this new workbook open method?
The goal is that every new xls created to have the following code on workbook_open:
Dim objNet As Object
On Error Resume Next
Set objNet = CreateObject("WScript.NetWork")
MsgBox "Network username is: " & objNet.UserName
Set objNet = Nothing
thank you.
Bookmarks