Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm doing the simplest task - to fill a cell with a ctrl+a key with the
following code: Sub PrintName() ' ' PrintName Macro ' Print Waterbury ' Keyboard Shortcut: Ctrl+a ' ActiveCell.FormulaR1C1 = "" Range("A1:D1").Select With Selection .HorizontalAlignment = xlLeft .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With Application.CommandBars("Stop Recording").Visible = False Application.CommandBars("Task Pane").Visible = False ActiveCell.FormulaR1C1 = "Waterbury" Range("C2").Select Application.Run "PERSONAL.XLS!PrintName" 'it stops here ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\Monty\My Documents\Book1.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False ActiveWindow.Close Workbooks.Add End Sub It stops at line -Application.Run "Personal.XLS!PrintName" and highlights it yellow. I get a run-time error 28: Out of stack space. It seems to be in a continuous loop until it runs out of memory. Any hints appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Out of Stack Space error | Excel Discussion (Misc queries) | |||
OUT OF STACK SPACE ERROR | Excel Programming | |||
'Out of stack space' error on SaveAs | Excel Programming | |||
Out of Stack Space error | Excel Programming | |||
Run time error 28: Out of stack space | Excel Programming |