bobhc Excel Ninja Jul 30, 2012 #1 Good day All I keep getting a VBE syntax error with this line of code Worksheets(“Percentage_Increase”).Range(“A1:C3”).Value = 12.5 probably wrong but I think it may be some thing to do with the : separator.
Good day All I keep getting a VBE syntax error with this line of code Worksheets(“Percentage_Increase”).Range(“A1:C3”).Value = 12.5 probably wrong but I think it may be some thing to do with the : separator.
N NARAYANK991 Excel Ninja Jul 30, 2012 #2 Hi Bob , I don't get an error ; I had to replace the double quote symbols with the real double quote characters. Narayan
Hi Bob , I don't get an error ; I had to replace the double quote symbols with the real double quote characters. Narayan
bobhc Excel Ninja Jul 30, 2012 #3 Good day NARAYANK991 Many thanks for that..lesson learned,...keep an eye on the copy and paste ......but I now have this "subscript out of range " in the same line of code
Good day NARAYANK991 Many thanks for that..lesson learned,...keep an eye on the copy and paste ......but I now have this "subscript out of range " in the same line of code
Hui Excel Ninja Staff member Jul 30, 2012 #4 Code: Worksheets("Percentage_Increase").Range("A1:C3").Value = 12.5 Works fine Make sure if you copied/pasted the code that you re-type the quotation marks " 's Make sure that the sheet is called "Percentage_Increase" without the quotes Make sure there are no leading or trailing spaces on the sheet name
Code: Worksheets("Percentage_Increase").Range("A1:C3").Value = 12.5 Works fine Make sure if you copied/pasted the code that you re-type the quotation marks " 's Make sure that the sheet is called "Percentage_Increase" without the quotes Make sure there are no leading or trailing spaces on the sheet name
bobhc Excel Ninja Jul 30, 2012 #5 Hui again I find myself in the most likable position of say thank you, I acted on your post and found a trailing space on the sheet name. Lesson learned and filed away in the grey cells
Hui again I find myself in the most likable position of say thank you, I acted on your post and found a trailing space on the sheet name. Lesson learned and filed away in the grey cells
Hui Excel Ninja Staff member Jul 30, 2012 #6 Bobhc Surprisingly this is a very common mistake, which I just posted about in another post.