PC Review


Reply
Thread Tools Rate Thread

Is this code ok?

 
 
ADK
Guest
Posts: n/a
 
      10th Jul 2007
Before I implement this in my workbook, I just wanted to know if anyone sees
issues/problems with using this code. Seems to work fine. If ok, should I
include error handling in the code?

Both are in ThisWorkbook

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
Application.Quit
End Sub

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
End Sub

Thanks,

ADK
VBA Beginner


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      10th Jul 2007
Looks okay, but what happens if the workbook has changed, you will get a
message asking to save. Is that OK< or do you want to handle automatically?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ADK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Before I implement this in my workbook, I just wanted to know if anyone
> sees issues/problems with using this code. Seems to work fine. If ok,
> should I include error handling in the code?
>
> Both are in ThisWorkbook
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Application.DisplayFullScreen = False
> Application.Quit
> End Sub
>
> Private Sub Workbook_Open()
> Application.DisplayFullScreen = True
> End Sub
>
> Thanks,
>
> ADK
> VBA Beginner
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      10th Jul 2007
I don't like other workbooks that try to close excel. What if I have multiple
workbooks open when I close your workbook?

ADK wrote:
>
> Before I implement this in my workbook, I just wanted to know if anyone sees
> issues/problems with using this code. Seems to work fine. If ok, should I
> include error handling in the code?
>
> Both are in ThisWorkbook
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Application.DisplayFullScreen = False
> Application.Quit
> End Sub
>
> Private Sub Workbook_Open()
> Application.DisplayFullScreen = True
> End Sub
>
> Thanks,
>
> ADK
> VBA Beginner


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linq to XML--Are there code examples that make Linq as easy as SQL? Or how can I convert ths simple pseudo code into real code? Reece Microsoft C# .NET 4 10th Dec 2008 03:13 AM
ATI Radeon Drivers - Code 43, Code 37 & Code 10 =?Utf-8?B?SmFrZQ==?= Windows Vista Hardware 14 29th Aug 2006 05:50 AM
ATI Display Drivers - Code 43, Code 37, Code 10 Jake Windows Vista Hardware 2 8th Jul 2006 04:00 PM
what is the difference between code inside a <script> tag and code in the code-behind file? keithb Microsoft ASP .NET 1 29th Mar 2006 02:00 AM
[New] Zipoid - ZIP Code, City Name and Area Code Lookup - Zip Code to Zip Code Distance Calculation Mel Freeware 0 22nd Jul 2005 04:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 AM.