+ Reply to Thread
Results 1 to 4 of 4

Use of Variable

  1. #1
    Registered User
    Join Date
    02-23-2012
    Location
    Helsinki, Finland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Use of Variable

    I'm wondering how I can use variable here:

    Sub Delete_Till()
    Dim Del_Till As Integer
    Del_Till = Range("h1").Value
    Rows("2:100").Delete Shift:=xlUp
    End Sub

    I need use variable value instead of ex. 100 above.
    This does not work:

    Sub Delete_Till()
    Dim Del_Till As Integer
    Del_Till = Range("h1").Value
    Rows("2:Del_Till").Delete Shift:=xlUp
    End Sub

    -Thank, Jackie
    Last edited by JackieJag; 02-23-2012 at 12:39 PM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Use of Variable

    Please use code tags when posting code.

    Please Login or Register  to view this content.
    Good luck.

  3. #3
    Registered User
    Join Date
    02-23-2012
    Location
    Helsinki, Finland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Use of Variable

    That code does work as I planned.
    Thanks for quick and 100% reply.

    -Jackie

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Use of Variable

    Glad to help.

    Please don't forget to mark the thread solved - see the FAQ link at the top of the page.

+ 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