So I have a Macro that Opens an Attachment, and saves it in a shared drive location. After it saves I need to change the value of A1 to "Hostname"
Also I'd prefer it if I could save/close it by Name like wb(UnixSystemAssignements).Save & Close
Code:
Set objApp = CreateObject("Excel.Application")
objApp.Visible = False
Set wb = objApp.Workbooks.Open("\\ServerName\ShareName\Incubator\AutoEmails\FileName.xlsx", True, False)
'Change Value in A1 of Servers Tab
wb.Worksheets("Servers").Range("A1").Value = "Hostname"
activeworkbook.Save
activeworkbook.Close
Application.Quit
End Sub
Also I'd prefer it if I could save/close it by Name like wb(UnixSystemAssignements).Save & Close
Last edited: