+ Reply to Thread
Results 1 to 4 of 4

Need help chaning a code from worksheet to row

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    Houston, USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Need help chaning a code from worksheet to row

    Hello I have this vba programmed to one of my worksheet that enables a cell to change color when double clicked, the thing is I want to change it so that it only works on row 45 of the sheet, not on the entire sheet, thanks for the help

    Please Login or Register  to view this content.
    Last edited by rnelson28; 07-19-2012 at 08:04 AM. Reason: Added code tags

  2. #2
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Excel vba

    1. Please change title to be more descriptive one. See forum rules #1
    2. Surround your code in if statement. If target.row = 45 then ...
    Regards,
    Vandan

  3. #3
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Excel vba

    Added red, which will only let the code run if it's in row 45.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Excel vba

    @rnelson28 Welcome to the forum. Unfortunately you've inadvertently broken two of the forum rules. Please notice that I have applied code tags to your post. The rules require them so please keep that in mind whenever showing code in your future posts. Also, please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


+ 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