jamienwood
Board Regular
- Joined
- Apr 14, 2002
- Messages
- 133
i have this code to cope a sheet then save it, supposidly as the name you write but infact it doesnt, then its meant to creat a hyperlink to that file and it doesn't quite do that either any surgestions?Sub MAC2()
Dim bookname
bookname = InputBox("Enter New Book Name")
Sheets("sheet1").Select
Sheets("sheet1").Copy
ActiveWorkbook.SaveAs Filename:="C:\" & (bookname) & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Windows("original book2.xls").Activate
Range("a2").Select
' Hyper Link
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="C:\" & (bookname) & ".xls", _
TextToDisplay:=(bookname)
End Sub
Dim bookname
bookname = InputBox("Enter New Book Name")
Sheets("sheet1").Select
Sheets("sheet1").Copy
ActiveWorkbook.SaveAs Filename:="C:\" & (bookname) & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Windows("original book2.xls").Activate
Range("a2").Select
' Hyper Link
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="C:\" & (bookname) & ".xls", _
TextToDisplay:=(bookname)
End Sub