![]() |
code for closing out an excel file while in the browser?
I am using Excel 2003, FrontPage 2003 and internet explorer. I can access the
excel file from my browser but can not close the excel file with a command button while the file is working from the browser. If I am working from the excel program itself, the button works but not from the browser. The range code is to get back to the top before quitting and I do not want any changes to the file to be saved. As you can tell Im in the learning mode. Thanks. Wayne Private Sub CommandButton4_Click() Range("a1").Select Range("b11").Select Workbooks("KHC WEB 1.04.XLS").Close SaveChanges:=False End Sub |
code for closing out an excel file while in the browser?
Try this:
Private Sub CommandButton4_Click() Range("a1").Select Range("b11").Select ThisWorkbook.Saved = True ThisWorkbook.Close End Sub JLGWhiz "Tom" wrote: I am using Excel 2003, FrontPage 2003 and internet explorer. I can access the excel file from my browser but can not close the excel file with a command button while the file is working from the browser. If I am working from the excel program itself, the button works but not from the browser. The range code is to get back to the top before quitting and I do not want any changes to the file to be saved. As you can tell Im in the learning mode. Thanks. Wayne Private Sub CommandButton4_Click() Range("a1").Select Range("b11").Select Workbooks("KHC WEB 1.04.XLS").Close SaveChanges:=False End Sub |
All times are GMT +1. The time now is 09:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com