+ Reply to Thread
Results 1 to 4 of 4

Basic Question about varaibles

  1. #1
    Adam
    Guest

    Basic Question about varaibles

    I am trying to use the rows command. I know how to use it if the row is a
    number. For example, I know that this would work: rows(1:1)

    However I was to use a variable instead of a number. Here is what I have.
    It isn't working. Thank you.


    Rows("i:i").Delete Shift:=xlUp


  2. #2
    Norman Jones
    Guest

    Re: Basic Question about varaibles

    Hi Adam,

    Try:

    Rows(i).Delete

    ---
    Regards,
    Norman



    "Adam" <Adam@discussions.microsoft.com> wrote in message
    news:C2FCEBE3-E606-4741-816A-DA6C4ABE78BE@microsoft.com...
    >I am trying to use the rows command. I know how to use it if the row is a
    > number. For example, I know that this would work: rows(1:1)
    >
    > However I was to use a variable instead of a number. Here is what I have.
    > It isn't working. Thank you.
    >
    >
    > Rows("i:i").Delete Shift:=xlUp
    >




  3. #3
    anonymousA
    Guest

    Re: Basic Question about varaibles

    hi,

    this way, it should be OK.

    Sub test()
    I = 6
    johndoe = I & ":" & I
    Rows(johndoe).Interior.ColorIndex = 19

    End Sub

    see ya later

    "Adam" <Adam@discussions.microsoft.com> a écrit dans le message de news:
    C2FCEBE3-E606-4741-816A-DA6C4ABE78BE@microsoft.com...
    > I am trying to use the rows command. I know how to use it if the row is a
    > number. For example, I know that this would work: rows(1:1)
    >
    > However I was to use a variable instead of a number. Here is what I have.
    > It isn't working. Thank you.
    >
    >
    > Rows("i:i").Delete Shift:=xlUp
    >




  4. #4
    Gord Dibben
    Guest

    Re: Basic Question about varaibles

    Adam

    Sub test()
    Dim i As Long
    i = InputBox("enter a number")
    Rows(i).Delete Shift:=xlUp
    MsgBox "row " & i & " was deleted"
    End Sub





    On Mon, 10 Jan 2005 14:23:02 -0800, "Adam" <Adam@discussions.microsoft.com>
    wrote:

    >I am trying to use the rows command. I know how to use it if the row is a
    >number. For example, I know that this would work: rows(1:1)
    >
    >However I was to use a variable instead of a number. Here is what I have.
    >It isn't working. Thank you.
    >
    >
    >Rows("i:i").Delete Shift:=xlUp



+ 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