I can't seem to get this VBA to work...:(
Posted by Ania on January 23, 2002 12:16 PM
can someone please explain to me why DealName in this code does not take more than one word?
Private Sub Workbook_Open()
Dim DealName As String
Do Until DealName <> ""
DealName = InputBox("Enter your Deal File Name:", "Name Your Deal")
Loop
FirstSpace = InStr(DealName, " ")
If FirstSpace <> 0 Then
DealName = Left(DealName, FirstSpace)
End If
Range("$M$3") = DealName
ThisFile = Range("M$3").Value
ActiveWorkbook.SaveAs Filename:="R:\Kondrikova\onQ\WIP\Cla" & ThisFile & ".xls"
End Sub