Does anyone know what the problem is?Please Login or Register to view this content.
Does anyone know what the problem is?Please Login or Register to view this content.
Last edited by JosephP; 02-01-2013 at 09:02 AM. Reason: add code tags
You say it does not work. What happens when you run the code. Do you get a compile error? If so, on what line?
Have you debugged the code?
Look here: http://www.cpearson.com/excel/DebuggingVBA.aspx
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Thank you for the answer.
I get the following runtime error message:
Runtime nr: -2147417848 (80010108)
Method 'Value' Of Object 'Range' Failed.
Then the excel workbook closes down.
Do you have a named range that is only three letters long or three letters then numbers? Just asking because thats OK in 2003, but in 2010 that will reference a column (probably several thousand columns over from where you want) instead of your named range.
Well, i am not quite sure. Can you see if I have done this?
I have pasted in my code in the thread's first post.
DeNam;
Bloodmeat is referring to named ranges in your spreadsheet and not in your VBA code. Have your stepped through your code using the F8 key to see where the code fails? Or if you run the compile it will highlight the line of code that is failing.
you are changing the sheet from a change event which will trigger the change event again and again and again...
you need to use
at the start of the code andPlease Login or Register to view this content.
at the finishPlease Login or Register to view this content.
Josie
if at first you don't succeed try doing it the way your wife told you to
Is it possible to do on a private worksheet sub?
I am not able to step through using the F8 key.
Thanks JosephP, your answer seems to have solved the problem.
Any ideas why it worked without in Excel2003?
excel 2003 was more lenient in many ways but the code really should always have had the lines I suggested
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks