VBA not Working

Blytheee

New Member
Joined
Dec 3, 2015
Messages
8
Hello Everyone,

I've been having some problems with a really simple VBA code, I have tried "save as" or Copying the file and renaming, once or twice, for some reason it has worked, most of the time it doesn't. I have to create 30, 35MB Workbooks and everything works fine, formulas and VBA apart form the below, any help would be great. Oh and it is in a module.

Sub recalcCells(): Selection = Selection.Value: End Sub

Thanks,

Matt
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hello Everyone,

I've been having some problems with a really simple VBA code, I have tried "save as" or Copying the file and renaming, once or twice, for some reason it has worked, most of the time it doesn't. I have to create 30, 35MB Workbooks and everything works fine, formulas and VBA apart form the below, any help would be great. Oh and it is in a module.

Sub recalcCells(): Selection = Selection.Value: End Sub

Thanks,

Matt

try
Code:
Sub recalcCells()
With Selection
    .Value = .Value
End With
End Sub
 
Upvote 0
That's a no I'm afraid, highlights ".Value = .Value" on this one. I just cant figure this one out, such a simple macro!
 
Upvote 0

Forum statistics

Threads
1,216,074
Messages
6,128,652
Members
449,462
Latest member
Chislobog

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