Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default If row 2 contains nothing then move onto next macro.......

Hello

I wondered if someone could help,

I have several (hundred) macro doing different things,

What I thought though is that if my sheets contain no data then the
macro will debug as it cannot continue.

I wanted to add a line at the beginning of each of my macro's
basically telling it which macro to visit if the row within the sheet
is zero.

Perhaps I could do this in replacement of the error message?

I have no idea what I could do to solve this but I was hoping someone
could help.

THanks in advance,

Andrea

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default If row 2 contains nothing then move onto next macro.......

if activesheet.UsedRange.rows.count < 2 then
exit sub
end if

--
Regards,
Tom Ogilvy


" wrote:

Hello

I wondered if someone could help,

I have several (hundred) macro doing different things,

What I thought though is that if my sheets contain no data then the
macro will debug as it cannot continue.

I wanted to add a line at the beginning of each of my macro's
basically telling it which macro to visit if the row within the sheet
is zero.

Perhaps I could do this in replacement of the error message?

I have no idea what I could do to solve this but I was hoping someone
could help.

THanks in advance,

Andrea


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default If row 2 contains nothing then move onto next macro.......

Hi Tom,

I did get this working but there is so much macro coding for the
entire process that it's a nightmare. My macros all appear to be
doing the same thing for each sheet in the workbook......instead I
have created a macro for each of the sheets......not the easiest way I
bet.

Then I have calculations on bold figures........my macros stop working
when there is something it cannot find....

I've terribly wrong with all this.....

thanks for your help all the same,

im very grateful,

andrea

On 12 Jun, 21:29, Tom Ogilvy
wrote:
if activesheet.UsedRange.rows.count < 2 then
exit sub
end if

--
Regards,
Tom Ogilvy



" wrote:
Hello


I wondered if someone could help,


I have several (hundred) macro doing different things,


What I thought though is that if my sheets contain no data then the
macro will debug as it cannot continue.


I wanted to add a line at the beginning of each of my macro's
basically telling it which macro to visit if the row within the sheet
is zero.


Perhaps I could do this in replacement of the error message?


I have no idea what I could do to solve this but I was hoping someone
could help.


THanks in advance,


Andrea- Hide quoted text -


- Show quoted text -



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
macro to move to another cell Frappier New Users to Excel 8 November 11th 08 02:06 PM
Macro to move row from one worksheet to another Anders Excel Discussion (Misc queries) 2 October 25th 06 05:21 PM
Macro to move a row from one table to another John Excel Worksheet Functions 0 January 9th 06 06:00 PM
Macro to move to next column iblonger Excel Discussion (Misc queries) 9 January 3rd 06 05:18 PM
macro to move cursor Bob S[_2_] Excel Programming 4 January 15th 04 03:36 PM


All times are GMT +1. The time now is 12:18 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"