+ Reply to Thread
Results 1 to 4 of 4

Vba connect sheets with a button

Hybrid View

  1. #1
    Registered User
    Join Date
    07-22-2021
    Location
    greece
    MS-Off Ver
    2010
    Posts
    2

    Vba connect sheets with a button

    Hello i am new here and i would like a help!
    i have 3sheets: a calculator , job ticket and a quote
    the only input data is on calculator the other two are autofilled with the nessasary data i need from calculator
    i need to create a button in the calculator and when it clicked to automate dublicate the current calculator so i can calculate a new piece but i want to add the same time new specs of the work on the other templates!

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,410

    Re: Vba connect sheets with a button

    upload your workbook - see big yellow banner
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Registered User
    Join Date
    07-22-2021
    Location
    greece
    MS-Off Ver
    2010
    Posts
    2

    Re: Vba connect sheets with a button

    Well i created the button i need, now i want when i create a new sheet of my template to automatically copy paste the yellow range of cells on the other two sheets and connected with my new template!
    and this to be continued for every new template i create !
    Attached Files Attached Files

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,395

    Re: Vba connect sheets with a button

    Option Explicit
    
    Private Sub CommandButton1_Click()
    Dim ans As String
        ans = Me.TextBox1.Value
        Sheets("Template").Copy After:=Sheets(Sheets.Count)
        ActiveSheet.Name = ans
        Me.TextBox1.Value = ""
        Sheets(ans).Range("A1:K8").Value = Sheet2.Range("A6:K13").Value
        Sheets(ans).Range("A10:K18").Value = Sheet3.Range("A6:K13").Value
        Unload UserForm1
    End Sub

+ 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] How can I connect a button on my spreadsheet to launch my UserForm?
    By imaquila in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2020, 12:09 PM
  2. How to connect different criteria among 3 sheets?
    By Zeltene in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-10-2017, 10:23 AM
  3. [SOLVED] connect checkbox to a macro button
    By Danielle22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2013, 04:08 AM
  4. how can i connect to scanner when i click a button in excel
    By ram99599 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-08-2013, 06:45 AM
  5. [SOLVED] Need formula to connect sheets
    By besmir in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-25-2013, 01:41 PM
  6. [SOLVED] How to connect the data in two sheets in one book?
    By freeSky in forum Excel General
    Replies: 10
    Last Post: 10-04-2012, 03:01 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