Why do I get an error?

C

Charlotte E.

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...
 
B

Barb Reinhardt

I'd probably write it like this

Dim Ark As Worksheet
Set Ark = ActiveWorkbook.ActiveSheet

Dim Celle As Range
Set Celle = Ark.ActiveCell
 
D

Dave Peterson

Activecell applies to a window or the application.

Set Celle = Activecell

looks like what you want.
 
Top