Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro and Excel-- Problem with macro
Message
De
03/05/1999 14:04:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
FoxPro and Excel-- Problem with macro
Divers
Thread ID:
00214644
Message ID:
00214644
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform