General information
Category:
Coding, syntax & commands
Title:
Finding the far-right column in excel
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only