HELP - Running Macros in VBA

L

Louise

Why (&%¤#"!!!) are my macros in VBA not running? I have copied small Macros
from reliable sources on the Internet to Modules in Excel, but I can't make
them run?! What can I be doing wrong?

One example:

Sub DeleteBlankRows2()
'Deletes the entire row within the selection if _
some of the cells WITHIN THE SELECTION contain no data.
On Error Resume Next
Selection.EntireRow.SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
 
D

Don Guillett

I just placed this macro into a REGULAR module and it ran fine by f5 at the
macro.

Where did you put it and how are you trying to execute.
 
J

JE McGimpsey

Are you putting the macro in a regular code module rather than a
workbook or worksheet code module?

Do you have your security set to something other than High?

How are you trying to initiate the macro?
 
L

Louise

I enter a workbook. Open the MVB editor. I put the code in a module (Insert >
Module) in the Modules folder under the VBAProjects (PERSON.XLS), and I tried
to run the Macro from the workbook which I have entered Microsoft Visual
Basic through. Is this right?
 
L

Louise

I enter a workbook. Open the MVB editor. I put the code in a module (Insert >
Module) in the Modules folder under the VBAProjects (PERSON.XLS), and I tried
to run the Macro from the workbook which I have entered Microsoft Visual
Basic through. Is this right?
 
L

Louise

Do you have your security set to something other than High?
I have set this to low
How are you trying to initiate the macro?
I am trying to run it by Alt+F8 and then running it? Can it be something I
have not installed?
 
J

JE McGimpsey

Are you sure the macro isn't running?

If you set a breakpoint at the first line, is the sub entered? What
happens when you step through it?

Try removing the "On Error Resume Next" - do you get an error message?


Do you have your security set to something other than High?
I have set this to low
How are you trying to initiate the macro?
I am trying to run it by Alt+F8 and then running it? Can it be something I
have not installed?[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top