Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding the far-right column in excel
Message
From
30/09/2002 13:29:49
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00705926
Message ID:
00706012
Views:
26
Look at using o.Application.ActiveSheet.UsedRange.Columns.Count

Alan

>Hi,
>I want to open up a spreadsheet and select the entire top row,
>so that the column headings will wrap. How do I programmatically
>tell excel to select all columns that have stuff in them?
>Thanks
>Steve
>o = CREATEOBJECT('excel.application')
>o.Application.Workbooks.Open(eFile)
>o.Visible= .T.
>o.Application.DisplayAlerts = .F.
>
>o.Application.Range("A1:O1").Select && <---
>o.Application.Range("O1").Activate && <---
> With o.Application.Selection
> .WrapText = .T.
> EndWith
>o.Application.Range("A1").CurrentRegion.Select
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform