Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there an easier way
Message
De
25/06/2002 16:33:07
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
25/06/2002 03:27:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00671465
Message ID:
00672180
Vues:
13
thanks for the tips. I used the usedrange.cells.style... worked like a charm .. thanks...



>>to do this.
>>
>>
>>WITH .Parent.Styles("Cell")
>>	.Borders(xlEdgeTop).LineStyle	 = xlContinuous
>>	.Borders(xlEdgeLeft).LineStyle 	 = xlContinuous
>>	.Borders(xlEdgeRight).LineStyle  = xlContinuous
>>	.Borders(xlEdgeBottom).LineStyle = xlContinuous
>>ENDWITH
>>
>>**-- set all cells with borders
>>FOR lnI = 1 TO .usedRange.columns.count
>> FOR lnJ = 1 TO .UsedRange.rows.count
>lcRange = [.Range("] + CHR(lnI + 64) + ALLTRIM(STR(lnj)) + [").Style = "Cell"]
>>	&lcRange
>>ENDFOR
>>ENDFOR
>>
>
>John,
>Use range. :
>
>
>  **-- set all cells with borders
>  .UsedRange.Cells.Style = "Cell"
>
>
>Doing cell by cell means to call VBA numerous times which is an overkill.
>
>Also if next time you need similar code do not it the way you did (first assigning to a string then macro expansion). ie:
>Insetead of this :
>
>lcRange = [.Range("] + CHR(lnI + 64) + ALLTRIM(STR(lnj)) + [").Style = "Cell"]
>&lcRange
>
>Use this :
>
> lcRange = CHR(lnI + 64) + ALLTRIM(STR(lnj))
> .Range(lcRange).Style = "Cell"
>
>Cetin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform