Converting Textboxes Link and or Formula to Values in a Copied Sheet using Excel VBA

0 votes

I'm copying a sheet to another workbook using this VBA code:

Sub Macro1()
    Dim num As Integer
    Dim tbox As TextFrame2
    
    Sheets("2316 Printing Template (v2018)").Select
    Range("AS9").Select
    
    For i = 1 To 2
        Range("AS9").Value = i
        Sheets("2316 Printing Template (v2018)").Copy After:=Workbooks("Book1.xlsx").Sheets(i)
        With ActiveSheet.UsedRange
            .Value = .Value
        End With
        
        Worksheets("2316 Printing Template (v2018)").Name = Left(Range("AS12").Value, 31)
        Windows("2316 PrinterTemplate (2022).xlsm").Activate
    Next i
    
End Sub

As the value of Cell AS9 changes, the template's cells and textboxes update. I then duplicate the template to a different workbook and rename the newly created sheet. The textboxes are still connected to the original workbook and sheet, which is my current issue. How can I change them to be tied to values?

Here is a screenshot of the 2 files. The First one is the template: enter image description here

And this is the copied sheet: enter image description here

Jan 31, 2023 in Others by Kithuzzz
• 38,010 points
395 views

1 answer to this question.

0 votes

Copy the values using Range and Value2

With ActiveSheet.UsedRange
    Sheets("2316 Printing Template (v2018)").Range(.Address).Cells.Value2 = .Value2
End With
answered Jan 31, 2023 by narikkadan
• 63,700 points

Related Questions In Others

0 votes
0 answers

Converting feet & inches (e.g., "5 ft 1 in") to decimal feet using VBA or Excel

I have a database with a few ...READ MORE

Nov 2, 2022 in Others by Kithuzzz
• 38,010 points
440 views
0 votes
1 answer

Excel VBA- How to loop through specific sheets in a workbook and format the same ranges in each sheet

Range(...) instructs VBA to always use the ...READ MORE

answered Mar 21, 2023 in Others by Kithuzzz
• 38,010 points
1,245 views
0 votes
1 answer

How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

answered Sep 24, 2022 in Others by narikkadan
• 63,700 points
938 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
943 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,274 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
567 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
799 views
0 votes
1 answer

Excel VBA: Open Hyperlinks in a loop and copy paste download link in a sheet

Refer this tutorial for your solution: https://evermap.com/Tutorial_AB ...READ MORE

answered Dec 25, 2022 in Others by narikkadan
• 63,700 points
1,046 views
0 votes
1 answer

Is there a way to test a formula result in excel and type it only once, all within one cell and not using a user defined function?

Use the Let function: =LET(Value,A1+B2+C4+G3+B4,IF(Value>10,"No",Value)) I hope this helps ...READ MORE

answered Jan 9, 2023 in Others by narikkadan
• 63,700 points
431 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP