Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Disable auto xlmsgbox, replace w/own

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Disable auto xlmsgbox, replace w/own

Myriam,

No, you cannot change the locked cell message.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Myriam" wrote in message
...
Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Disable auto xlmsgbox, replace w/own

Thanks.

"Chip Pearson" wrote:

Myriam,

No, you cannot change the locked cell message.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Myriam" wrote in message
...
Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Disable auto xlmsgbox, replace w/own

If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook (auto_open or workbook_open would be a
nice home.)

Myriam wrote:

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable auto xlmsgbox, replace w/own

Hi Myriam

In Excel 2002-2003 this is option when you protect your sheet.
You don't need the code then that Dave posted.

Or something like this in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Target.Cells(1).Select
If Target.Locked = True Then MsgBox "your text"
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dave Peterson" wrote in message ...
If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook (auto_open or workbook_open would be a
nice home.)

Myriam wrote:

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Disable auto xlmsgbox, replace w/own

Just a word of warning if the OP shares the workbook with users of xl2k (or
below). You'll need the .enableselection code.

But if you won't use the workbook on earlier versions, Ron's suggestion to use
Tools|protect|protect sheet and toggle that option is far easier.

Ron de Bruin wrote:

Hi Myriam

In Excel 2002-2003 this is option when you protect your sheet.
You don't need the code then that Dave posted.

Or something like this in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Target.Cells(1).Select
If Target.Locked = True Then MsgBox "your text"
End Sub

--
Regards Ron de Bruin
http://www.rondebruin.nl

"Dave Peterson" wrote in message ...
If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook (auto_open or workbook_open would be a
nice home.)

Myriam wrote:

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!


--

Dave Peterson


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Disable auto xlmsgbox, replace w/own

Dave and Ron,
Thanks you so much. I'll try your solutions tomorrow.
Regards,


"Dave Peterson" wrote:

Just a word of warning if the OP shares the workbook with users of xl2k (or
below). You'll need the .enableselection code.

But if you won't use the workbook on earlier versions, Ron's suggestion to use
Tools|protect|protect sheet and toggle that option is far easier.

Ron de Bruin wrote:

Hi Myriam

In Excel 2002-2003 this is option when you protect your sheet.
You don't need the code then that Dave posted.

Or something like this in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Target.Cells(1).Select
If Target.Locked = True Then MsgBox "your text"
End Sub

--
Regards Ron de Bruin
http://www.rondebruin.nl

"Dave Peterson" wrote in message ...
If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook (auto_open or workbook_open would be a
nice home.)

Myriam wrote:

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!

--

Dave Peterson


--

Dave Peterson


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Disable auto xlmsgbox, replace w/own

Dave,
Thanks for the warning. I am using xl2K. Some of my clients are still using
that version, so I'll (for now at least) stick to the .enableselection code.

I really like Ron's solution but I haven't had a chance to use it
Regards,

"Dave Peterson" wrote:

Just a word of warning if the OP shares the workbook with users of xl2k (or
below). You'll need the .enableselection code.

But if you won't use the workbook on earlier versions, Ron's suggestion to use
Tools|protect|protect sheet and toggle that option is far easier.

Ron de Bruin wrote:

Hi Myriam

In Excel 2002-2003 this is option when you protect your sheet.
You don't need the code then that Dave posted.

Or something like this in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Target.Cells(1).Select
If Target.Locked = True Then MsgBox "your text"
End Sub

--
Regards Ron de Bruin
http://www.rondebruin.nl

"Dave Peterson" wrote in message ...
If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook (auto_open or workbook_open would be a
nice home.)

Myriam wrote:

Hi, everyone,
Can someone tell me how to disable
the xl auto message box and replace
it with my own?
I want to have my own messages displayed when
my worksheet cells are locked.
Thanks!

--

Dave Peterson


--

Dave Peterson


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 auto (date) format? Joe User[_2_] Excel Discussion (Misc queries) 3 April 8th 10 12:12 AM
Disable Find-Replace Function FARAZ QURESHI Excel Discussion (Misc queries) 0 January 4th 07 06:58 PM
Disable Dialogue Box To Save & Replace File Dolphinv4 Excel Discussion (Misc queries) 2 October 24th 05 05:42 AM
Can I disable auto formula update? jch New Users to Excel 4 August 9th 05 06:31 PM
Disable auto editor formatting Niklas[_3_] Excel Programming 1 August 14th 03 12:51 PM


All times are GMT +1. The time now is 04:19 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"