Hello Everyone:
I am looking to integrate a VBA code to delete all codes upon clicking the Exit button ("Private Sub CommandButton9_Click()
") on a spreadsheet.
Since I sent this sheet to clients, I do not want to have all of the codes running in the background. I would also like to get rid of a button "cmdopenform" that shows up in my first sheet. I use it to initiate all of the processes, but the client has no use for it.
Below is what I have on that button right now:
Code:
Private Sub CommandButton9_Click()
Dim MyPath$, MyName$
MyPath = "C:\"
MyName = InputBox("Enter today's date ie: 2011.1018")
MyName = MyName & " Salary Survey " & InputBox("Enter Client Number") & ".xls"
ActiveWorkbook.SaveAs MyPath & MyName
MsgBox "File is Saved Under Your C:\"
Unload Me
Sheet1.Visible = xlSheetVeryHidden
End Sub
Any help is appreciated.
I am looking to integrate a VBA code to delete all codes upon clicking the Exit button ("Private Sub CommandButton9_Click()
") on a spreadsheet.
Since I sent this sheet to clients, I do not want to have all of the codes running in the background. I would also like to get rid of a button "cmdopenform" that shows up in my first sheet. I use it to initiate all of the processes, but the client has no use for it.
Below is what I have on that button right now:
Code:
Private Sub CommandButton9_Click()
Dim MyPath$, MyName$
MyPath = "C:\"
MyName = InputBox("Enter today's date ie: 2011.1018")
MyName = MyName & " Salary Survey " & InputBox("Enter Client Number") & ".xls"
ActiveWorkbook.SaveAs MyPath & MyName
MsgBox "File is Saved Under Your C:\"
Unload Me
Sheet1.Visible = xlSheetVeryHidden
End Sub
Any help is appreciated.