Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FoxPro and Excel-- Problem with macro
Message
From
03/05/1999 14:04:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
FoxPro and Excel-- Problem with macro
Miscellaneous
Thread ID:
00214644
Message ID:
00214644
Views:
66
Hello guys ,

Perhaps this is not the place to put this but, see if you can help me:

I have this app that after the SQL select builds this table and then exports it to an EXCEL file, now I have this template that reads in this file and then formats it,(that's what is suppossed to do).
The problem is that when the following code runs (VB macro in the Excel template)

Workbooks.Open FileName:="C:\SMART\TEMP\TEST1.XLS"
Cells.select <-- It dies here *****
Selection.Columns.AutoFit
Range("A1").Select
Range("A2:M23").Select
Selection.Copy
ActiveWindow.WindowState = xlMinimized
ActiveWindow.WindowState = xlMaximized
Range("B12").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveWindow.ScrollColumn = 4

It gives me a 1004 runtime error, 'select method of range failed'
It ocurrs whenever you have empty info in the workbook or the object workbook does not exist.. but It does exists ..

anybody ,, help!!

Mark Oliva
Next
Reply
Map
View

Click here to load this message in the networking platform