Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to find the last used row in column C in a sheet, using
automation from Word. I use the following code: Dim rk As Integer On Error Resume Next Set xlapp = GetObject(, "Excel.application") If Err.Number < 0 Then Set xlapp = CreateObject("excel.Application") End If xlapp.Workbooks.Open FileName:= _ "C:\Documents and Settings\Administrator\Dokumenter\Deltagere.xls" xlapp.Visible = True rk = xlapp.activeworkbook.sheets(1).Range("c65536").End (xlUp).Row It opens the workbook and selects the last used cell in column C, but rk return a 0 in stead of thec expected 27 in this case. How can I Find the row number of last used cell in column C? Jan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
call excelsheet within excelsheet when user clicks excelsheet ico | Excel Worksheet Functions | |||
How to use a macro from another excelsheet | Excel Programming | |||
Protected Excelsheet | Excel Programming | |||
how to use an excelsheet that is already in my userform | Excel Programming | |||
Go to lastrow using other column's lastrow | Excel Programming |