Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could just put what you want in the appropriate Then/Else portion of your
code. Option Explicit Sub testme() Dim myWkbk As Workbook Set myWkbk = Nothing On Error Resume Next Set myWkbk = Workbooks("TTT.xls") On Error GoTo 0 If myWkbk Is Nothing Then 'do something Else 'do something else End If End Sub ????? wrote: if i want to check if a file is not open the macro is If Workbooks("Ttt.xls") Is Nothing Then..... but when i want to write it in the opposit like: If Workbooks("Ttt.xls") Is exist Then..... this macro did not work what is the correct macro to the opposit of " Is Nothing" thank you rozent -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening .csv file in Excel2003 vs Excel2000 | Excel Discussion (Misc queries) | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Creating a new excel file from an existing file using macro | Excel Programming | |||
SaveAs macro: How do I specify "Replace existing file?" | Excel Programming | |||
Import xls file..vba excel2000 | Excel Programming |