Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Louise
 
Posts: n/a
Default HELP - Running Macros in VBA

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).EntireR ow.Delete
On Error GoTo 0
End Sub

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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?



In article ,
Louise wrote:

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).EntireR ow.Delete
On Error GoTo 0
End Sub

  #4   Report Post  
Louise
 
Posts: n/a
Default

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?

"JE McGimpsey" wrote:

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?



In article ,
Louise wrote:

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).EntireR ow.Delete
On Error GoTo 0
End Sub


  #5   Report Post  
Louise
 
Posts: n/a
Default

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?

"Don Guillett" wrote:

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.

--
Don Guillett
SalesAid Software

"Louise" wrote in message
...
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).EntireR ow.Delete
On Error GoTo 0
End Sub






  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

That should work.

What about my other questions?

In article ,
Louise wrote:

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?

  #7   Report Post  
Louise
 
Posts: n/a
Default

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?

"JE McGimpsey" wrote:

That should work.

What about my other questions?

In article ,
Louise wrote:

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?


  #8   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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?


In article ,
Louise wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros running slow in Excel 2003 ebeltran Excel Discussion (Misc queries) 0 March 8th 05 08:30 PM
Can macros output to a cell selected prior to running it? winnie Excel Worksheet Functions 3 February 17th 05 11:03 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
Running Macros in protected workbook petunia Excel Worksheet Functions 3 January 18th 05 09:24 PM


All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"