Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

font change in dynamically created textbox control

jugheadjughead Member Posts: 4
Hi
I wanted to create a textbox in a worksheet on the fly. i am able to do that but am not able to change the font of the textbox EVERYTIME. i am able to change it once and after that whenever the code is run i get a runtime error 1004. My code is as follows:

With Workbooks("Timing.xls").Worksheets("timing").Shapes.AddTextbox(msoTextOrientationHorizontal, Format(Columns(1).width) + ((i - 1) * 30 + 5), 80, 70, 50)
.TextFrame.Characters.Font.name = "Arial"
.TextFrame.Characters.text = clock
.Fill.Transparency = 1
.Line.Transparency = 1
End With

Thanking u in anticipation

Comments

  • Shawn CarterShawn Carter Member Posts: 0

    || http://forcoder.org || free ebooks and video tutorials about || MATLAB PL/SQL Python Scratch Objective-C Visual Basic .NET Visual Basic Assembly Go C JavaScript R PHP Swift Java Ruby Perl C# Delphi C++ Clojure Crystal Dart LabVIEW Fortran Prolog ABAP Rust Scheme COBOL Lisp ML Erlang F# D Alice Apex Bash Logo VBScript Julia FoxPro Ada Hack SAS Kotlin Lua Scala Transact-SQL Awk || __

Sign In or Register to comment.