About Miguel Zapico Expertise I can answer question about how to use scripts to consolidate data, connect different systems and automate tasks. I have no experience on using VBScript on web programming.
Experience I have been using VBScript and Windows Scripting Host as my swiss tool for the last 6 years.
Organizations New York PC users group (NYPC)
Independant Computer Consultants Association (ICCA)
Education/Credentials Microsoft MCSE in Windows NT
Expert: Miguel Zapico Date: 8/9/2006 Subject: Using Save As with VBA and Input Boxes
Question I need to know how to use input boxes to generate a file name that VB can then use to save the file as, so far I have:
Sub Test()
Dim Employeename As String
Dim Reportdate As Variant
Employeename = InputBox("Enter name")
Reportdate = InputBox("Enter date inthe following format 01.01.1900")
Workbooks.Add
fileSaveName = ("Friday Communication created by ") & (Employeename) & (" on ") & (Reportdate)
MsgBox "Save as " & fileSaveName
If vbOK Then
ActiveWorkbook.SaveAs Filename:="Y:\Work\" < fileSaveName > ".xls"
End If
It does save a copy of the file but it saves it as TRUE.xls, clearly I am missing a trick, can you help?
Answer I think the trick is on the use of parenthesis to concatenate text, the code is doing logical comparisions instead. Try changing the sentence to:
fileSaveName = "Friday Communication created by " & Employeename & " on " & Reportdate