INVALID PROPERTY VALUE: SHEET NAME

marsland

New Member
Joined
Jan 17, 2005
Messages
5
Hi, Ive got a minor problem really:

Ive written all my code only ive now decided i want to change a sheet name. It keeps returning "INVALID PROPERTY VALUE" when i try and change it in the vba editor in the properties box.

Any ideas as to how i can get round this?!?! Or why its doing it in the firslt place
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
marsland,
Can you post your code, and let us know what the old sheet and new sheet names are.

Cal
 

marsland

New Member
Joined
Jan 17, 2005
Messages
5
theres too much of it to be honest!!!!!

the old name was just 'sheet1' and the new name i want is 'home'
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
OK then,

when i try and change it in the vba editor in the properties box.

This statement doesn't make a lot of sense to me? You wouldn't change the sheet name in a properties box, it would be in all the references to that sheet within your code?

ie.

Sheets("Sheet1").????
Would change to
Sheets("Home").????

What object are you changing the properties box of?

Cal
 

marsland

New Member
Joined
Jan 17, 2005
Messages
5

ADVERTISEMENT

Yeeah - ive tried changing all the references throughout my code - just like you implied and then also, in the editor - in the "properties - sheet 1" box (its always on the LHS of my page - not sure about other users!!) on the 'Name' property, ive tried typing in home but it refuses it.
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
marsland,
The value you are trying to change in the vba editor shouldn't be a issue. As soon as you change the name on your workbook, it should update in the vba editor. It should say something like Sheet1 (Home). If not then your sheetname change didn't work correctly(I've never seen it not change).
Your update of the references tells me that you should be referencing the new named sheet fine. Do you run into a code error when you run it? If so, post the line of code that errors. If not, what's it doing wrong?
One other thing to check. Make sure your sheet name doesn't have any extra spaces. Try changing the sheet name again, and see what's highlighted. It could be you added a space by mistake, so it's looking for sheets("Home ") instead of sheets("Home").

HTH
Cal
 

marsland

New Member
Joined
Jan 17, 2005
Messages
5
Thanks Cal,

Finally got it sorted - you were right with the spelling! (She says shamefully) why do such trivial things always mess up days worth of code?!?!?!
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
:biggrin: The only problem is you don't realize it's a simple problem till you've tried all the difficult things first.
 

Forum statistics

Threads
1,147,690
Messages
5,742,647
Members
423,746
Latest member
Joaogomes

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
Top