Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select range fails
The code is in ThisWorkbook. There are problems when quitting Excel with
several wbooks open. If this is the only workbook open the code runs ok but fails if there are others open as well. I thought by placing it in ThisWorkbook module it was specific but maybe not. How should I qualify the Select statement please? Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Range("A100").Select 'Fails here if other wbooks are open ActiveWindow.DisplayGridlines = False Application.DisplayAlerts = False ActiveWorkbook.Save Application.DisplayAlerts = True End Sub T.I.A. Geoff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel VBA Paste of Range with PrefixCharacter fails from VB.NET | Excel Discussion (Misc queries) | |||
select method of range class fails | Excel Programming | |||
Named Range Fails in VBA Code | Excel Programming | |||
Sheets select method fails when workbook is opened by another workbook | Excel Programming | |||
Select method of Range fails | Excel Programming |