Remove Formatting Runtime Error 1004

GreatOffender

Board Regular
Joined
Feb 2, 2015
Messages
53
Not the best or brightest using VBA but I've done this a 100 time before but now it's giving me grief. Keep getting runtime 1004 error. This is driving me crazy so any help would be appreciated.

Thanks,

Code:
Dim wc As Worksheet   
Set wc = Sheets("ABC")
   
wc.UsedRange.Value = wc.UsedRange.Value
 
I found the offending object. All of the cells in the first 3 columns have quotes around the data and I use the "UsedRange.Value" to remove the quotes. I went through the entire sheet of source data and found one cell the listed with a "=" before the data (="data is here"). This was my Waterloo! Once the "=" was removed it all worked as advertised. I use this method of removing values for several spread sheets but this was my first encounter with this oddity. Others using this macro were not using the same source data which made me believe it was localized to just me.


Fluff - Thank you for sticking with this. As a hard headed Irishman I have a problem with walking away.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Glad you sorted it out & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

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