+ Reply to Thread
Results 1 to 5 of 5

Macro User Input

  1. #1
    Registered User
    Join Date
    03-01-2009
    Location
    Woodmere, New York
    MS-Off Ver
    Excel 2007
    Posts
    31

    Macro User Input

    Hi guys,

    I would like to do a Macro which requires user to go to a specific line which is variable in each work sheet. I would like to be able to enter the number and then delete all lines below that point and then continue with the balance of the macro.

    Is there an easy way to pause the Macro and then restart it? Or is there a code that I can insert in the Macro to locate a specific Cell and then delete all lines below the next line?
    Last edited by tallguy6354; 03-30-2009 at 12:03 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    re: Macro User Input

    Yes, all that is doable. Describe the criteria for selecting this one particular cell that makes it unique or the first of it's kind.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-01-2009
    Location
    Woodmere, New York
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Macro User Input

    Thnaks for the interest.

    The first blank cell in Columm D see the Book3.xlsx

    I want to delete all data for the entire sheet from line 5 down. The last line of data in columm D varies with each file.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro User Input

    Try this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-01-2009
    Location
    Woodmere, New York
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Macro User Input

    Thank you,

    I just had to eliminate the Sub x and I inserted it after the last line of my Macro and it works perfectely.

+ 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