I've got a bit further : -
Dim oExcel, oWB, oSheet, sValue, oVisible,
Set oExcel=CreateObject("Excel.Application")
Set oWB=oExcel.Workbooks.Open("C:\temp\*&^%$")
Set oSheet=oWB.Sheets("*&^%$")
oExcel.Visible=TRUE
LastCol = oSheet.UsedRange.Columns.Count
LastRow = oSheet.UsedRange.Rows.Count
FirstCell = replace(oSheet.Cells(2,"C").Address,"$","")
LastCell =replace(oSheet.Cells(LastRow,"Y").Address,"$","")
Range = (FirstCell & ":"& LastCell)
It now returns the cell reference but still I can't get tit to select the
range, anybody any ideas??
Best Regards
Neville
On Friday, 6 December 2013 16:54:01 UTC, Ganesh muralidharan wrote:
> ExcelObj.Rows("1:1").Select
>
>
> On Fri, Dec 6, 2013 at 10:23 AM, Neville Palmer
> <[email protected]<javascript:>
> > wrote:
>
>> I know the first cell in the range which will be "C2" but the last cell
>> could be anything so I need to search for it, then I want to highlight the
>> range for deletion. I'm able to get the last row and last column number
>> which on the practice sheet is row 125 and Column 25. The row number could
>> change but the column number is a constant.
>>
>> Dim oExcel, oWB, oSheet, sValue, oVisible,
>>
>> Set oExcel=CreateObject("Excel.Application")
>> Set oWB=oExcel.Workbooks.Open("C:\temp\*&^%$")
>>
>> Set oSheet=oWB.Sheets("*&^%$")
>> oExcel.Visible=TRUE
>>
>> LastRow = oSheet.UsedRange.Rows.Count
>> LastCol = oSheet.UsedRange.Columns.Count
>>
>> Any help on how to select these cells would be very welcome
>>
>> TIA
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Regards,
>
>
> Ganesh Muralidharan
> 'God Never Forgets'
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.