+ Reply to Thread
Results 1 to 7 of 7

Need a combinator for VBA

  1. #1
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Need a combinator for VBA

    I need to add the below code to another code but I don`t know how. I tried End With in various locations but I have had no luck.

    Please Login or Register  to view this content.
    Can you assist please?
    Last edited by chin67326; 12-23-2015 at 07:16 AM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Combining VBA codes

    It might be easier if you attached the workbook with the userform in it.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: Combining VBA codes

    Examples for combining a listbox selection to the code too?
    Last edited by chin67326; 12-23-2015 at 07:18 AM.

  4. #4
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: Combining VBA codes

    Anyone had a chance to review Chin's question further yet?

    Thanks!

  5. #5
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: Need a combinator for VBA

    Do you think that this a difficult task?
    Last edited by chin67326; 12-23-2015 at 07:18 AM.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Need a combinator for VBA

    The easiest method to retain the last listbox selection is to just hide the userform instead of Unloading it.

    Please Login or Register  to view this content.
    Then the next time you show it (within the same session), all the control's last states are retained.


    2.) The code doesn't qualify a worksheet within the database. It defaults to whatever the active sheet is when the database workbook is opened. Since your example database workbook only has one sheet, it can't go wrong.

    This syntax would qualify Sheet3 by name (if it had a Sheet3).

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  7. #7
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: Need a combinator for VBA

    Thanks AlphaFrog! That makes sense!

+ 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. Combining 2 VBA codes
    By watiwawa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-09-2014, 02:20 AM
  2. combining two vba codes into one
    By Ironman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2013, 01:52 AM
  3. Combining vba codes makes the previous codes broken !
    By MDPLUS in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2013, 10:00 AM
  4. [SOLVED] Help! combining 2 VBA codes
    By iamreese in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-29-2012, 07:24 AM
  5. Combining two VBA codes
    By kimokurt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2011, 10:05 AM
  6. combining codes
    By tweety127 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-18-2008, 06:48 PM
  7. [SOLVED] combining 2 codes
    By steve in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2006, 01:15 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