"Mircrsoft Excel" their pop-up, how do I change that?

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,113
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have a protected sheet1 where the user pastes into this sheet1 a set number of cells.

When the user starts off in the wrong column and begins to paste their cells Microsoft Excel produces the following error message:

Mircrsoft Excel
The cell or chart you're trying to change is on a protected sheet.
To make changes, click Unprotect Sheet in the Review tab(you might need a password.)


So, How do I change this pop-up to my own creation.

For example:

MsgBox ("Please make sure that you are in Column B when pasting! Thank you!")


I've tried what I thought were logical approaches but am not achieving my message box.



Any suggestions???
 
Hi James006,

I really like your approach and appreciate it:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B2:D10")) Is Nothing Then MsgBox "Hello"
End Sub

Thank you!
-Pin

Glad this is helping you out ...

Thanks ... for your Thanks ...
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi Jaafar,

Thanks for reposting!

I'm going to take a look at it!

-Pin
 
Upvote 0
Hi Jaafar,

I have a question about your codes that you posted here.

The ones posted for the 32 and 64 bits.

I'm using the 32 bit for excel code and sometimes I'm getting a Microsoft VB Run-time error '1004': MsgBox popup:

You cannot used the command on a protected sheet. To use this command, you must first unprotect the sheet (Review tab, Changes group, Unprotect Sheet button). You may be prompted for a password.

Where, I'm using different workstations with other users on a shared drive, if this helps add any information to your thoughts.

Any thoughts??

Many thanks,
Pinaceous
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top