+ Reply to Thread
Results 1 to 22 of 22

Adding to some existing VBA code

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Adding to some existing VBA code

    I have some working VBA code that lets me do two things.
    1) When I click in a cell (with a "q" in a cell, directly to the left of it) it puts an "X" in the cell.
    2) When I click in a cell (with a "/" in the cell, directly to the left of it) it puts a "wingding symbol" in the cell.
    These work perfectly. I would like to add one more component, the same "type/way" as above. (see next line)
    When I click on a cell (with a "z" in the cell, directly to the left of it) I want it to put in the letters "FE". (same way as above)

    Can someone modify, or add to my VBA code (shown below), so this will work??
    If you could send me back the full (modified code), that would be great.
    Thanks.


    Here's my VBA code;

    Please Login or Register  to view this content.
    Last edited by richard11153; 03-10-2014 at 03:32 PM.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    so close on the Code tags....the end one should be "[/code]"

    you should be able to add another ElseIF and copy your "q" code and then change it to z and FE...
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I'm lost with "changing or adding" to code.
    Can you add or modify my code in the post, and send the entire "modified" code back?

    Thanks

  4. #4
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I'm lost with "changing or adding" to code.
    Can you add or modify my code in the post, and send the entire "modified" code back?

    Thanks

  5. #5
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I tried it, (adding the new section). The old code still worked but the added line did nothing.

  6. #6
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Adding to some existing VBA code

    Quote Originally Posted by richard11153 View Post
    I'm lost with "changing or adding" to code.
    Can you add or modify my code in the post, and send the entire "modified" code back?

    Thanks
    Judge is referring to your post on this forum. You didn't use the tags properly.

  7. #7
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    Wow, Does it really matter that much?
    I think I have it right now.

  8. #8
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    not a lot, there are a few reasons....

    1) it is a forum rule the moderators will give you infraction points.
    2) and more importantly it hold the formatting of your code and makes it easier to read for the folks trying to help....

    so, I was trying to help you not get infraction points and see if I could figure out your VBA issue....which I'm working on....hope this helps....

  9. #9
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    Thanks, I really do appreciate the help.
    I may already have some "infraction points" I guess.

  10. #10
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    no problem....I don't seem to be able to get your code that you have post working, much less add to it....can you attach a macro enabled workbook with data that is not company confidential?

  11. #11
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I have a "working sample" worksheet I can send, but I'm not seeing where / how, to attach it.

  12. #12
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    Scroll to the bottom and you should see a Go Advanced and scroll down in there and you should see a attachment area....it using a weird browse kind of system but it works....

  13. #13
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    Found it.

    Here's is a working sample of the VBA
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    This is with using excel 2003 (if it matters)

  15. #15
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    see if this gets you closer

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    No, Not working. The original code still puts the X & wingdings in,
    But the added code, does nothing.

  17. #17
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    No, The Original code part is working, but the added code is doing nothing.

  18. #18
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding to some existing VBA code

    seems to work on my machine....here is the file....did you copy my code in or just type in the addition?....because I added code to the top also....
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I copied the entire code before. I also just downloaded & tested the "adjusted" file you attached.
    It does not work as it should (putting the FE "in or out" each time the cell is clicked on).
    There is improvement however, at least the curser, now moves into the cell on the left as it should.
    But no "FE" appears when clicked on.

  20. #20
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I have to go out for a while, Ill be back in a hour or so, to see if you or anybody else
    can figure this out. Thanks for the help, so far. This stuff is never easy!!

  21. #21
    Forum Contributor
    Join Date
    11-26-2008
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    326

    Re: Adding to some existing VBA code

    I just played with the code a bit. I see it puts an FE in the cell, but when you click on it again,
    it does not go back to "blank" as the other boxes do. It looks like if that can be fixed, I'm all set.
    Any suggestions?

  22. #22
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding to some existing VBA code

    http://www.excelforum.com/excel-prog...ml#post3614289

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Existing VBA that needs loop adding to the code.
    By dave1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2012, 10:54 AM
  2. Replies: 2
    Last Post: 03-17-2011, 08:55 PM
  3. Help adding to existing code
    By Jrykiss in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-02-2010, 06:11 PM
  4. Adding Code to an Existing UserForm with VBA
    By JimmyA in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2010, 12:02 PM
  5. adding to an existing line of VBA code
    By Gazzr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2007, 08:37 PM

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