Writing vs. recording Add ins HELP

bdunk

Active Member
Joined
Aug 1, 2002
Messages
290
I have written a macro by opening a new workbook going to the VB editor and writing code in a new module. The code is as follows:

Sub Delete_PartQty1()
With Columns(1)
.Replace what:="0", replacement:="1", LookAt:=xlWhole
.SpecialCells(4).EntireRow.Delete
End With
End Sub

I then leave the editor and save the file as a .xla file in the Add Ins folder.

When I go in to Excel and activate the macro in the AddIns list and try to assign a button to execute this add in I can not get it to recognize the add in name. I am typing the name properly.

When I record a new macro and save the file as a .xla file I have no problems assigning a button to this add in. Is something I am not doing when I write my own add in vs recording it with the macro recorder?
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Watch MrExcel Video

Forum statistics

Threads
1,118,080
Messages
5,570,085
Members
412,310
Latest member
mark884
Top