+ Reply to Thread
Results 1 to 9 of 9

changing cell value in vba at current row

  1. #1
    Forum Contributor
    Join Date
    05-14-2012
    Location
    England
    MS-Off Ver
    Excel 2010/2013
    Posts
    100

    changing cell value in vba at current row

    Hi there, First I'm a total newbie so sorry if this is too obvious but I'm working with VBA and excel 2003 and I want to change the value of a cell. Sounds simple but.. I've cobbled together code which allows me to use a drop down box to select a name from column B and can even select the corect row and clear all the data on it. But I can't then enter data in certain cells on that row. Here's my code:

    Please Login or Register  to view this content.
    I've emptied the row and now want to add "zzz" to (current row, column B) as well as "01/01/2099" to other cells on the same row.

    Thanks for taking pity on a newbie!
    Ps thanks for putting me straight about code. Got it!
    Last edited by KAPearson; 05-19-2012 at 12:27 PM.

  2. #2
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: VERY basic question

    Hi and welcome,

    A word to the wise. You will get your hand slapped for not putting the code in tags as per the rules:

    Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    "code"
    your code here ...
    and here ...
    and here "Code"


    ... and appear like this when posted:


    Please Login or Register  to view this content.
    You can also type the code tags in manually if you prefer. For more information about these and other tags, click here.
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,545

    Re: VERY basic question

    Welcome to the forum. And beware ... in your first post, you have broken two of the forum's rules. Non-specific thread title and missing code tags.

    You're going to have to do something about this rule breaking before anyone is permitted to answer your question(s).

    Kind regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    05-14-2012
    Location
    England
    MS-Off Ver
    Excel 2010/2013
    Posts
    100

    Re: VERY basic question

    Thank you for the advice. Consider me bashful. I'm off to sort it now.

  5. #5
    Forum Contributor
    Join Date
    05-14-2012
    Location
    England
    MS-Off Ver
    Excel 2010/2013
    Posts
    100

    Re: VERY basic question

    Thank very much I think thats sorted it?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,545

    Re: changing cell value in vba at current row

    I think this is what you want:

    Please Login or Register  to view this content.

    Regards, TMS

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,545

    Re: changing cell value in vba at current row

    Oh, and thanks for the rep

  8. #8
    Forum Contributor
    Join Date
    05-14-2012
    Location
    England
    MS-Off Ver
    Excel 2010/2013
    Posts
    100

    Re: changing cell value in vba at current row

    Thanks TMShucks, that works a treat! I was going around in circles!
    Thank you very much.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,545

    Re: changing cell value in vba at current row

    You're welcome.

+ 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