This is another macro I use for another sheet. This works fine and I see no difference in standard lines with the macro which isn't working
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/07/2006 by BPPassPort User
'
' Keyboard Shortcut: Ctrl+t
'
Dim s As String, s1 As String
s = ActiveSheet.Range("F10").Text
s1 = "C:\Documents and Settings\" & _
"fackt0\Desktop\Excel probleem\Shipments\"
ActiveWorkbook.SaveAs _
Filename:=s1 & s & ".xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
This is the macro which isn't working again.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/07/2006 by BPPassPort User
'
' Keyboard Shortcut: Ctrl+t
'
Sub OpenWorkbook()
Dim s1 as String, bk as Workbook, bk1 as Workbook
s1 = "C:\Documents and Settings\" & _
"fackt0\Desktop\Shipments\"
set bk = activeWorkbook
if dir(s1 & Range("C3").Text & ".xls") <> "" then
set bk1 = Workbooks.Open(s1 & Range("J5").Text & ".xls")
bk.Activate
else
msgbox "workbook not found"
End if
End sub
Bookmarks