+ Reply to Thread
Results 1 to 3 of 3

setting a cells value using range

  1. #1
    cantonarv
    Guest

    setting a cells value using range

    what am i doing wrong

    dim myRange as Range
    dim iNum as integer
    iNum= 6

    Set myRange = Cells(iNum + 2, 1)
    myRange.Value = 34

    trying to set a cell myRange to cell(8,1)
    then putting the value 34 into the cell


  2. #2
    Niek Otten
    Guest

    Re: setting a cells value using range

    Works fine for me
    You don't try to do this in a Function, do you?
    It should work in a Sub

    --
    Kind regards,

    Niek Otten

    "cantonarv" <[email protected]> wrote in message
    news:[email protected]...
    > what am i doing wrong
    >
    > dim myRange as Range
    > dim iNum as integer
    > iNum= 6
    >
    > Set myRange = Cells(iNum + 2, 1)
    > myRange.Value = 34
    >
    > trying to set a cell myRange to cell(8,1)
    > then putting the value 34 into the cell
    >




  3. #3
    Don Guillett
    Guest

    Re: setting a cells value using range

    see other post

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "cantonarv" <[email protected]> wrote in message
    news:[email protected]...
    > what am i doing wrong
    >
    > dim myRange as Range
    > dim iNum as integer
    > iNum= 6
    >
    > Set myRange = Cells(iNum + 2, 1)
    > myRange.Value = 34
    >
    > trying to set a cell myRange to cell(8,1)
    > then putting the value 34 into the cell
    >




+ 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