Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default Can we disable Excel's default toolbar?

My application deletes Excel's toolbar and creates my toolbar. However,
Excel (at least with 2003) retains one icon on my tool bar to the immediate
left that allows the user several options I don't want the user to select.

Is it possible, when creating my toobar, to disable this Excel icon and/or
selections?

Thank you in advance.

Jim Kobzeff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Can we disable Excel's default toolbar?

"JK" wrote in message news:PU9_c.683$Va5.412@trnddc01...
My application deletes Excel's toolbar and creates my toolbar. However,
Excel (at least with 2003) retains one icon on my tool bar to the

immediate
left that allows the user several options I don't want the user to select.

Is it possible, when creating my toobar, to disable this Excel icon and/or
selections?


Hi Jim,

This icon can be removed by protecting your workbook. It's the Windows
protection option that does the trick. It doesn't matter whether or not you
protect the Structure.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


  #3   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default Can we disable Excel's default toolbar?

Thank you, Rob. I did as you suggested, but it didn't work. The Excel icon
and its menu selections remain alive and well.

Jim Kobzeff

"Rob Bovey" wrote in message
...
"JK" wrote in message news:PU9_c.683$Va5.412@trnddc01...
My application deletes Excel's toolbar and creates my toolbar. However,
Excel (at least with 2003) retains one icon on my tool bar to the

immediate
left that allows the user several options I don't want the user to
select.

Is it possible, when creating my toobar, to disable this Excel icon
and/or
selections?


Hi Jim,

This icon can be removed by protecting your workbook. It's the Windows
protection option that does the trick. It doesn't matter whether or not
you
protect the Structure.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Can we disable Excel's default toolbar?

Hi Jim,

Are you sure you're talking about the Excel icon located on the toolbar
or the Excel icon located in the top left corner of the screen? There are
two located roughly one above the other. Protecting the workbook using the
Tools/Protection/Protect Workbook menu and making sure the Windows checkbox
is selected will definitely remove the icon associated with the menu bar.
The Application window icon cannot be removed, but you can disable and
restore it with API calls as shown below:

Private Const MF_BYCOMMAND As Long = &H0
Private Const SC_CLOSE As Long = &HF060
Private Const API_FALSE As Long = 0&
Private Const API_TRUE As Long = 1&

Private Declare Function FindWindowA Lib "user32" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function GetSystemMenu Lib "user32" ( _
ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" ( _
ByVal hMenu As Long, _
ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" ( _
ByVal hWnd As Long) As Long

Private Sub DeleteXCloseMenu()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
DeleteMenu GetSystemMenu(hWnd, API_FALSE), SC_CLOSE, MF_BYCOMMAND
DrawMenuBar hWnd
End Sub

Private Sub RestoreXCloseMenu()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
GetSystemMenu hWnd, API_TRUE
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"JK" wrote in message news:Rgk_c.954$PK3.132@trnddc08...
Thank you, Rob. I did as you suggested, but it didn't work. The Excel icon
and its menu selections remain alive and well.

Jim Kobzeff

"Rob Bovey" wrote in message
...
"JK" wrote in message news:PU9_c.683$Va5.412@trnddc01...
My application deletes Excel's toolbar and creates my toolbar. However,
Excel (at least with 2003) retains one icon on my tool bar to the

immediate
left that allows the user several options I don't want the user to
select.

Is it possible, when creating my toobar, to disable this Excel icon
and/or
selections?


Hi Jim,

This icon can be removed by protecting your workbook. It's the

Windows
protection option that does the trick. It doesn't matter whether or not
you
protect the Structure.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *






  #5   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default Can we disable Excel's default toolbar?

Thank you, Rob. That did it.

Jim Kobzeff
"Rob Bovey" wrote in message
...
Hi Jim,

Are you sure you're talking about the Excel icon located on the toolbar
or the Excel icon located in the top left corner of the screen? There are
two located roughly one above the other. Protecting the workbook using the
Tools/Protection/Protect Workbook menu and making sure the Windows
checkbox
is selected will definitely remove the icon associated with the menu bar.
The Application window icon cannot be removed, but you can disable and
restore it with API calls as shown below:

Private Const MF_BYCOMMAND As Long = &H0
Private Const SC_CLOSE As Long = &HF060
Private Const API_FALSE As Long = 0&
Private Const API_TRUE As Long = 1&

Private Declare Function FindWindowA Lib "user32" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function GetSystemMenu Lib "user32" ( _
ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" ( _
ByVal hMenu As Long, _
ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" ( _
ByVal hWnd As Long) As Long

Private Sub DeleteXCloseMenu()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
DeleteMenu GetSystemMenu(hWnd, API_FALSE), SC_CLOSE, MF_BYCOMMAND
DrawMenuBar hWnd
End Sub

Private Sub RestoreXCloseMenu()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
GetSystemMenu hWnd, API_TRUE
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"JK" wrote in message news:Rgk_c.954$PK3.132@trnddc08...
Thank you, Rob. I did as you suggested, but it didn't work. The Excel
icon
and its menu selections remain alive and well.

Jim Kobzeff

"Rob Bovey" wrote in message
...
"JK" wrote in message news:PU9_c.683$Va5.412@trnddc01...
My application deletes Excel's toolbar and creates my toolbar.
However,
Excel (at least with 2003) retains one icon on my tool bar to the
immediate
left that allows the user several options I don't want the user to
select.

Is it possible, when creating my toobar, to disable this Excel icon
and/or
selections?

Hi Jim,

This icon can be removed by protecting your workbook. It's the

Windows
protection option that does the trick. It doesn't matter whether or not
you
protect the Structure.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *








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 change default font/pitch of text in Excel's comments? David Ashford[_2_] Excel Worksheet Functions 1 March 11th 09 11:19 PM
Change the default color of Excel's selected cells GeorgeT Excel Discussion (Misc queries) 0 September 3rd 07 07:52 PM
Add a close icon to Excel's Toolbar SNiness Excel Discussion (Misc queries) 1 December 10th 04 06:18 PM
Why are some commands in Excel's Drawing Toolbar greyed-out (eg T. Konrad Excel Discussion (Misc queries) 1 December 2nd 04 04:31 PM
Disable Excel's Auto Formatting Zleeperx Excel Programming 4 January 13th 04 07:38 PM


All times are GMT +1. The time now is 02:13 AM.

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"