Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
why does the following code work unless called by a form??? I have a form
that calls the routine but always gives the error 1004 application or object not defined error, BUT if you step thriough the code it works perfectly with no error. Any help? on error resume next only skips the code. Public Sub sendtotest() 'strStr1 As String, strStr2 As String) Dim strString1 As String Dim strString2 As String strString1 = "DCH1205" 'worksheet name strString2 = "Why can't I get this to WORK!!!" Call test(strString1, strString2) End Sub Public Sub test(strString1 As String, strString2 As String) Dim strText As String Dim strworksheet As String strText = strString2 strworksheet = strString1 Set myDocument = Worksheets(strworksheet) Set newWordArt = myDocument.Shapes.AddTextEffect( _ PresetTextEffect:=msoTextEffect28, Text:=strText, _ FontName:="Impact", FontSize:=36, _ FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, _ Top:=10) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WordArt | New Users to Excel | |||
WordArt - stretching | Excel Discussion (Misc queries) | |||
Wordart in Excel | Excel Worksheet Functions | |||
Print a WordArt in a Frontpage | Excel Programming | |||
Hiding Shapes When Not WordArt , or When WordArt Text < "Draft" | Excel Programming |