+ Reply to Thread
Results 1 to 5 of 5

Deleting entire row.

Hybrid View

mangesh Deleting entire row. 09-27-2006, 10:09 AM
jtp Give this a shot Sub... 09-27-2006, 10:28 AM
jtp Sorry you need to replace... 09-27-2006, 10:47 AM
wiredwrx Thanks for the code. I have... 11-07-2006, 04:30 PM
MDubbelboer 1. definitely. you can use... 11-07-2006, 04:37 PM
  1. #1
    Registered User
    Join Date
    03-15-2005
    Posts
    23
    Thanks for the code. I have a question though,

    I just started with VBA and MACROS, and want to keep all my macros in a workbook called Macros.

    However, I want to run the macro in other workbooks.

    When I tried that, I ran into an issue with the following line,

    Set cellB = Worksheets("Sheet1").Range("A" & (cellA.Row + 1) & ":A1000").Find(what:=cellA.Value)

    First, is there a way to change the ("sheet1) reference to something like ("currentsheet") where that means the currently active sheet.

    Also, does the "& ":A1000")" in the line mean that it stops checking at row 1000. Is there a way to make this work till the end of the data?

    thanks,
    Michael

  2. #2
    Forum Contributor
    Join Date
    07-13-2006
    Posts
    400
    Quote Originally Posted by wiredwrx
    Thanks for the code. I have a question though,

    I just started with VBA and MACROS, and want to keep all my macros in a workbook called Macros.

    However, I want to run the macro in other workbooks.

    When I tried that, I ran into an issue with the following line,

    Set cellB = Worksheets("Sheet1").Range("A" & (cellA.Row + 1) & ":A1000").Find(what:=cellA.Value)

    First, is there a way to change the ("sheet1) reference to something like ("currentsheet") where that means the currently active sheet.

    Also, does the "& ":A1000")" in the line mean that it stops checking at row 1000. Is there a way to make this work till the end of the data?

    thanks,
    Michael
    1. definitely. you can use activesheet to refer to the currently selected sheet

    2. it does stop checking at a1000. you can statically change that value to a larger number or you could do it dynamically with a cell.specialcells(xllastcell).row

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1