Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I open an Excel web file out side of the web browser view? Rwhite Excel Discussion (Misc queries) 1 October 26th 07 06:53 PM
Re-show userform after closing file - code help Gerry O Excel Discussion (Misc queries) 3 September 4th 07 10:52 PM
How to code on Macro on saving and closing a file? Eric Excel Worksheet Functions 1 June 10th 07 01:32 PM
Drag file from browser into Excel to create hyperlink. GJJ Excel Discussion (Misc queries) 0 June 7th 06 04:33 PM
Excel to browser file kumar_viswa2003 Excel Programming 1 November 18th 05 11:08 AM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"