View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default SaveAs without copying Macro

try windows.close

Sub CloseSelectedWorkbook()
On Error GoTo nn
Application.DisplayAlerts = False
workbookname = ActiveCell.Value
Windows("" & workbookname & ".xls").Close
Range("C3").Select
Application.DisplayAlerts = True
nn:
End Sub

--
Don Guillett
SalesAid Software

"Martijnhj " wrote in message
...
this is the code

Set VBComp = ThisWorkbook.VBProject.VBComponents_("Module1") - if
i save now (manually) there are no problems

ActiveWorkbook.SaveAs Filename:="C:\temp\file.xls",
FileFormat:=xlNormal,
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub

when i open file.xls it will display the message enable / disable
macro's

how is that possible?


---
Message posted from
http://www.ExcelForum.com/