Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005

    Unanswered: Cell value wont set?

    Okay, so I've done this qyute a few times in the past, but haven't touched code for a few months.

        x = Selection.Row
        y = Selection.Column
        With ActiveSheet
            .Cells(x, (y + 1)).Value = "kfhdfksh"
            ' GIDrs!Medlemsskab
        End With
    Its should be pretty obvious what I wish to. Basically I grab the coordinates of the current cell, and want to add a value to the cell next to it. Initially I am just testing with dummy data, but will be fetching data out of an ADO recordset.

    Apparently I'm referencing the cell wrong, but can't seem to figure out in which way?

    Thanks for any (really noobish) help,

    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Dec 2007
    This code works in a way that if i edit any cell then next cell wll be populated with dummy data
    what is the problem,can u pls brief?

  3. #3
    Join Date
    Oct 2003
    It should work, but I don't think you need the parentheses around y+1.

    With ActiveSheet
            .Cells(x, y + 1).Value = "kfhdfksh"
            ' GIDrs!Medlemsskab
        End With
    old, slow, and confused
    but at least I'm inconsistent!

    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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