LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
LPS LPS is offline
external usenet poster
 
Posts: 108
Default Modifying an Old Excel Macro

I have a macro (see below) which is designed (by someone else) to hide rows
that do not have any data in the current cell. Instead of hiding these rows,
I would like the macro to delete them.

I have tried to substitute the lines which change the row height to "0" with
the command: =edit.delete(3). This does not seem to work. Does anyone know
the correct syntax for a an older macro like this, to delete rows? Or, what
would all the code be if I converted the entire thing to Visual Basic. I am
a novice when it comes to this.

Any help will be greatly appreciated.

HideRows (H)
=ECHO(FALSE)
=ACTIVATE("Voucher")
=FORMULA.GOTO("Top_Item")
=ACTIVATE("Input")
=FORMULA.GOTO("Hide_items")
=SET.NAME("ItemNo",1)
=FOR("HIDE",1,2625)
= SELECT("RC")
= IF(OR(GET.FORMULA("RC")="0",GET.FORMULA("RC")="",D EREF(SELECTION())=0))
= ROW.HEIGHT(0)
= ACTIVATE("Voucher")
= ROW.HEIGHT(0)
= ELSE()
= ACTIVATE("Voucher")
= FORMULA(ItemNo)
= SET.NAME("ItemNo", ItemNo+1)
= END.IF()
= ACTIVATE("Voucher")
= SELECT("R[+1]C")
= ACTIVATE("Input")
= HIDE=HIDE+1
= SELECT("R[+1]C")
=NEXT()
=FORMULA.GOTO("R1C1")
=COLUMN.WIDTH(0)
=FORMULA.GOTO("R1C[+1]")
=ACTIVATE("voucher")
=FORMULA.GOTO("top_item")
=ECHO(TRUE)
=RETURN()

--
LPS
 
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
Modifying a protect unprotect macro Colin Hayes Excel Discussion (Misc queries) 10 May 1st 11 12:18 AM
Modifying Macro simplymidori[_2_] Excel Discussion (Misc queries) 3 April 13th 08 04:17 PM
Need help modifying a macro EAHRENS Excel Discussion (Misc queries) 13 March 31st 06 12:22 AM
Modifying Macro carl Excel Worksheet Functions 3 August 25th 05 08:45 PM
Modifying Sheet1 macro to run on Sheet2 Sharon Excel Discussion (Misc queries) 6 April 28th 05 01:21 PM


All times are GMT +1. The time now is 08:30 AM.

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

About Us

"It's about Microsoft Excel"