Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default red "X" disable

i want to try the code i got but will the "red X" be enabled/visible next
time i open a work sheet? its just for this one sheet that i need it not to
show.

http://groups.google.ca/group/micros...d264901943f109

or use Google Group search for: red x disable group:*excel*

the code that im looking at now are on that link..


i want to prevent ppl closing the workbook with the "X"

i got a button with a macro that saves, print and quit the workbook. and
another that just save and quit the workbook.

thanx


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default red "X" disable

Please don't start a new thread; it is very confusing. You should continue
the discussion in the original thread.

Did you try my suggestion? I don't think you should be playing with API
calls unless you are an expert user.
__________________________________________________ _______________________


"pswanie" wrote in message
...
i want to try the code i got but will the "red X" be enabled/visible next
time i open a work sheet? its just for this one sheet that i need it not
to
show.

http://groups.google.ca/group/micros...d264901943f109

or use Google Group search for: red x disable group:*excel*

the code that im looking at now are on that link..


i want to prevent ppl closing the workbook with the "X"

i got a button with a macro that saves, print and quit the workbook. and
another that just save and quit the workbook.

thanx




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default red "X" disable

nope no expert at all.... so i will skip the API thingie

i tried that but it gave me an error...

this is wat i did

with the workbook open i right click on the green thingie on left top coner
view code
paste


Public fMacro As Boolean

Private Sub Workbook_BeforeClose()
If Not fMacro Then Cancel = True
End Sub

and then in my macro that save and print and quit

change

ActiveWorkbook.Save
Application.Quit

to this
ActiveWorkbook.Save
ThisWorkbook.fMacro = True



this did not work.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default red "X" disable

You still need Application.Quit as the last line.
__________________________________________________ _______________________

"pswanie" wrote in message
...
nope no expert at all.... so i will skip the API thingie

i tried that but it gave me an error...

this is wat i did

with the workbook open i right click on the green thingie on left top
coner
view code
paste


Public fMacro As Boolean

Private Sub Workbook_BeforeClose()
If Not fMacro Then Cancel = True
End Sub

and then in my macro that save and print and quit

change

ActiveWorkbook.Save
Application.Quit

to this
ActiveWorkbook.Save
ThisWorkbook.fMacro = True



this did not work.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default red "X" disable

Also, my mistake, sorry. Should be:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
__________________________________________________ _______________________


"pswanie" wrote in message
...
nope no expert at all.... so i will skip the API thingie

i tried that but it gave me an error...

this is wat i did

with the workbook open i right click on the green thingie on left top
coner
view code
paste


Public fMacro As Boolean

Private Sub Workbook_BeforeClose()
If Not fMacro Then Cancel = True
End Sub

and then in my macro that save and print and quit

change

ActiveWorkbook.Save
Application.Quit

to this
ActiveWorkbook.Save
ThisWorkbook.fMacro = True



this did not work.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default red "X" disable

thats exactly what i needed!!!

thanx...



"Vasant Nanavati" wrote:

Also, my mistake, sorry. Should be:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
__________________________________________________ _______________________


"pswanie" wrote in message
...
nope no expert at all.... so i will skip the API thingie

i tried that but it gave me an error...

this is wat i did

with the workbook open i right click on the green thingie on left top
coner
view code
paste


Public fMacro As Boolean

Private Sub Workbook_BeforeClose()
If Not fMacro Then Cancel = True
End Sub

and then in my macro that save and print and quit

change

ActiveWorkbook.Save
Application.Quit

to this
ActiveWorkbook.Save
ThisWorkbook.fMacro = True



this did not work.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default red "X" disable

Great, glad it worked!
__________________________________________________ _______________________

"pswanie" wrote in message
...
thats exactly what i needed!!!

thanx...



"Vasant Nanavati" wrote:

Also, my mistake, sorry. Should be:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
__________________________________________________ _______________________


"pswanie" wrote in message
...
nope no expert at all.... so i will skip the API thingie

i tried that but it gave me an error...

this is wat i did

with the workbook open i right click on the green thingie on left top
coner
view code
paste


Public fMacro As Boolean

Private Sub Workbook_BeforeClose()
If Not fMacro Then Cancel = True
End Sub

and then in my macro that save and print and quit

change

ActiveWorkbook.Save
Application.Quit

to this
ActiveWorkbook.Save
ThisWorkbook.fMacro = True



this did not work.






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
Disable autoformat of "true" and "false" text drs207 Excel Discussion (Misc queries) 6 April 14th 23 05:33 PM
how can I disable "cutting cells" and "drag and drop "in excel ? mwoody Excel Worksheet Functions 4 August 25th 08 03:53 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Disable "Save" &/or "Close" universal[_4_] Excel Programming 3 October 25th 03 12:38 PM


All times are GMT +1. The time now is 12:03 PM.

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

About Us

"It's about Microsoft Excel"