+ Reply to Thread
Results 1 to 2 of 2

Combining VBA Subs

  1. #1
    Registered User
    Join Date
    05-05-2021
    Location
    United Kingdom
    MS-Off Ver
    Office 365
    Posts
    45

    Combining VBA Subs

    Hi All,

    I have a VBA code (created by Bernie) which works great but I want to have the same code to feed into a different sheet, using a slightly different criteria. I assume you cant have two subs in one worksheet but is there a way I can combine these two?

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Thank you,

    Haider
    Last edited by 6StringJazzer; 05-19-2021 at 11:12 AM. Reason: Moved from Excel General

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

    Re: Combining VBA Subs

    Your two procedures each have this line
    Please Login or Register  to view this content.
    If you combine the two procedures, what database sheet do you want to copy to for "CAL"? Or how would you distinguish between the two "CAL" s?

    Or does the source sheet differ for the two databases? If yes, what are the names of the source sheets?
    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.

+ 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. [SOLVED] Combining Multiple Subs Within Worksheet_Change
    By Sean Ross in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2013, 06:29 AM
  2. Combining two private subs
    By sydney5316 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2013, 05:43 PM
  3. Combining 2 private subs worksheet_change
    By kawaitang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 09:54 AM
  4. Module Subs executing Private Subs without prompt by code - Totally Lost
    By Ozan Ertem in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-26-2012, 05:31 PM
  5. Am i using too many Subs?
    By VBitteritus in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 09-07-2012, 10:51 AM
  6. [SOLVED] Need help combining two subs
    By UsmanBPD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2012, 02:12 PM
  7. Combining 2 VBA Subs
    By dhd2005 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2011, 01:16 PM
  8. Combining two Subs
    By Petitboeuf in forum Excel General
    Replies: 6
    Last Post: 04-27-2006, 10:45 AM

Tags for this Thread

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