P
Petter
Hi,
The code under make excel crash. I have found out that the last line
"ActiveWorkbook.Close" is the reason, but i dont understand why. And i like
to solve it aswell...
How can i close the workbook without crashing excel.....???
Sub FlyttetilHLT()
Dim adr
Dim fadr
Dim klient
klient = Range("c4").Value
adr = ActiveWorkbook.Path
Worksheets(2).Activate
fadr = adr & "\" & "IT" & klient & "TRS.HLT"
ActiveWorkbook.SaveAs Filename:=fadr, _
FileFormat:=xlText, CreateBackup:=False
ActiveWorkbook.Close
End Sub
The code under make excel crash. I have found out that the last line
"ActiveWorkbook.Close" is the reason, but i dont understand why. And i like
to solve it aswell...
How can i close the workbook without crashing excel.....???
Sub FlyttetilHLT()
Dim adr
Dim fadr
Dim klient
klient = Range("c4").Value
adr = ActiveWorkbook.Path
Worksheets(2).Activate
fadr = adr & "\" & "IT" & klient & "TRS.HLT"
ActiveWorkbook.SaveAs Filename:=fadr, _
FileFormat:=xlText, CreateBackup:=False
ActiveWorkbook.Close
End Sub