Excel VBA help

Ads Patz

New Member
Joined
Jan 12, 2018
Messages
15
Hi All,

Everytime I record a Macro for some reason the first action is Delete. = even though i did not press delete while recording macro. This is is causing issues when I try to re run the macro. Can someone please why this happens?

Sub Macro2()
'
' Macro2 Macro
'


'
Delete. = "Hello"
ActiveCell.Offset(3, 0).Range("A1").Visible
End Sub
 
Sub AdsMacro()
'
' AdsMacro Macro
'


'
ActiveCell.Offset(4, -8).Range("A1").Visible
Delete. = "zcfgnzf"
ActiveCell.Offset(5, 0).Range("A1").Visible
End Sub

That is the new macro i tried
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Are you using Excel's built-in macro recorder, or a third party one?
 
Upvote 0
When you go to Record the macro, it should list three options in that menu:
"View Macros"
"Record Macro..."
"Use Relative References"

Try selecting the "Use Relative References" option first, then "Record Macro...". At the very least, that should stop all those "ActiveCell.Offset..." commands.
I don't think it will affect the "Delete." statement, but cannot be sure. So we should probably test it out. That "Delete." is not even valid syntax, so I am not sure what would be doing that, other than a virus or some sort of Add-In...

You may want to go to File -> Options -> Add-Ins and view the Add-Ins that are showing as Active.
 
Last edited:
Upvote 0
I have the following Active/Enabled:

Analysis ToolPak
Analysis ToolPak - VBA
Send to Bluetooth
Solver Add-In
WebEx Productivity Tools


If you do not have any active, then that rules out any Add-In interference.

It is concerning to me that a "Delete" command is showing up in your Recorded Macro if you are not actually deleting anything.
I would highly recommend doing a Virus Scan on your computer, as it could be a virus infection.
 
Upvote 0
I am at a loss then. Something clearly appears to be interfering with your Macro Recorder.
Other than other VBA code, an Add-In, or a Virus, I have no idea what that might be.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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