Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why do I get an error in the last linie of these 4 lines of code:
Dim Ark As Object Set Ark = ActiveWorkbook.ActiveSheet Dim Celle As Object Set Celle = Ark.ActiveCell Thanks... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd probably write it like this
Dim Ark As Worksheet Set Ark = ActiveWorkbook.ActiveSheet Dim Celle As Range Set Celle = Ark.ActiveCell -- HTH, Barb Reinhardt "Charlotte E." wrote: Why do I get an error in the last linie of these 4 lines of code: Dim Ark As Object Set Ark = ActiveWorkbook.ActiveSheet Dim Celle As Object Set Celle = Ark.ActiveCell Thanks... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activecell applies to a window or the application.
Set Celle = Activecell looks like what you want. "Charlotte E." wrote: Why do I get an error in the last linie of these 4 lines of code: Dim Ark As Object Set Ark = ActiveWorkbook.ActiveSheet Dim Celle As Object Set Celle = Ark.ActiveCell Thanks... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error handling error # 1004 Run-time error | Excel Programming | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming |