View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default [vba] ActiveCell in Online xls document

ActiveCell is a window property. If no window is visible there is no active
cell. I'm guess that is the reason for the error message. If you cannot
address that then you may have to do some recoding.

Btw, it's usually not necessary to select cells to do something with them.

--
Jim Rech
Excel MVP
"Cassy" wrote in message
...
| Hi all,
|
| I made a calculator for a client of mine in a MS Excel Workbook (Office2k)
| so far so good ...
|
| Now they want to put the MS Excel file online, as an intranet
| application. But then the users get an error message saying:
| "Run-time error '91' Object variable or With block variable not set"
| on this line of code:
|
Code:
| ActiveCell.Offset(1, 0).Select
|
|
| Using the Range("A1").Select for example works, but I want to run over
| 50 cells containing parameters for the calculator.
|
| I should be able to use it like this:
|
Code:
| Dim i
| For i=1 to 5
| Range("A" & Cstr(i)).Select
| Next 'i
|
|
| But changing every ActiveCell in my code would be very difficult. Is
| there another solution possible?
|
| Thx in advance
|
| -Cassy-
| http://users.skynet.be/cassy