Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PM PM is offline
external usenet poster
 
Posts: 16
Default error 50290 when working from dll

Hi !

This simple code hides all lines except the selected line:

For i = 1 To nb_questions
.Rows(1 + i).RowHeight = 0
Next
.Rows(selection.Row).RowHeight = h

It works fine in VBA.

The same code generates an error when placed in a compiled dll.

I tested the code opening the dll and then Excel and going through step by
step with F8.
In my first testing, the most unusual thing happened : the program hid all
lines (the first part worked !) and then it crashed on the last line giving
error 50290 Application Defined or object defined error .

Now it works in this setting (dll runing in VB6, nothing changed (!)) but
crashes with the compiled dll (VB6 closed).
This goes far beyond my limited understanding.
Any help would be very much appreciated.

Pat.

PS. I've looked up some previous exchanges. Answers refer to Excel not being
ready because of other tasks. They do not seem to fit with such a simple
case as the above although I must say the above code is called by a
contextual menu (right-clic) which is provided by the dll (although
earlier).


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
Insert Function next to formula bar gives Run-time Error '50290' Nick Excel Discussion (Misc queries) 0 July 7th 08 03:41 PM
Excel VB Run-time error '50290' Bruce Blackman Excel Worksheet Functions 0 May 5th 05 02:26 PM
error 50290 Raj Sood Excel Programming 2 August 16th 04 03:25 PM
Error 50290: Error writing to Worksheet while using an ActiveX Control emblair3 Excel Programming 3 February 24th 04 06:03 PM


All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"