S
sam
Hi All, I am getting subscript out of range error on this line:
---------------Set wbk = Workbooks("C:\Documents\WorkBook1")
here is my code
Sub Submit_Click()
Dim wbk As Workbook
Dim ws As Worksheet
Dim FName As String
Set wbk = Workbooks("C:\Documents\WorkBook1")
With Worksheets("Sheet1")
Range("A1").Value = Me.Name.Value
End With
FName = "C:\Documents\" _
& "File_of" & "-" & Me.Name.Value & ".xls"
Application.DisplayAlerts = False
With wbk
..SaveAs Filename:=FName
..Close
End With
end sub
Thanks in advance
---------------Set wbk = Workbooks("C:\Documents\WorkBook1")
here is my code
Sub Submit_Click()
Dim wbk As Workbook
Dim ws As Worksheet
Dim FName As String
Set wbk = Workbooks("C:\Documents\WorkBook1")
With Worksheets("Sheet1")
Range("A1").Value = Me.Name.Value
End With
FName = "C:\Documents\" _
& "File_of" & "-" & Me.Name.Value & ".xls"
Application.DisplayAlerts = False
With wbk
..SaveAs Filename:=FName
..Close
End With
end sub
Thanks in advance