View Full Version : Macro In .xlt File Won't Work In .xls File?
marshman99ca
04-21-2007, 11:10 AM
This file is initially saved as a template (.xlt) file. This code works if I right-click and open the template and enter data, but when I just double click and open, causing it to open as an .xls file, it doesn't work. (The textboxes are inserted textboxes not from a userform).
VBA:
Option Explicit
Sub Text_Copy()
With Worksheets("Description") Worksheets("Summary").Shapes("TextBox3").TextFrame.Characters.Text = .Shapes("TextBox1").TextFrame.Characters.Text & " " & .Shapes("TextBox2").TextFrame.Characters.Text
End With
End Sub
I appreciate any help.
Aussiebear
04-22-2007, 12:02 AM
Hi Marshman99ca,
Please post your book so we can see the whole issue.
Carl A
04-22-2007, 04:16 AM
This has been Cross Posted here.
http://www.ozgrid.com/forum/showthread.php?t=67612
Aussiebear
04-22-2007, 04:25 AM
and cross asked here too...
http://vbaexpress.com/forum/showthread.php?t=12450
Still there's hope that by posting the workbook we can get around this issue.
marshman99ca
04-22-2007, 06:10 AM
I am new to these forums, but I have the feeling that this is a bad thing?? I was unaware. In future I will only post on one forum.
Aussiebear
04-22-2007, 12:25 PM
That's okay, it's not a hanging offence (so I've been told). If you refer to your other thread I think you might have an answer. When i copied your code to a module I immediately got a "Syntax" error on the With Worksheets line.
marshman99ca
04-22-2007, 05:34 PM
Thank you AussieBear, I have been travelling all day and am just getting back to this now and I do see another reply on Mrexcel.com.
I need to get good, really good, at Excel and VBA so we'll be chatting in the future.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.