• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

My First VBA code - Run-time error '424' : Object required [SOLVED]

James989

Member
Hi ,


1)I am using WINDOWS VISTA, M.S EXCEL 2007. I have installed an EXCEL Add-In program call EasyFitXL(from www.mathwave.com) to my computer. My VBA codes are as follow :-


Sub Easy6()


EasyFitXL.Randomize seed:=0

Rnum = EasyFitXL.UniformRand(0, 1)

Range("a1").Value = Rnum


End Sub


When I try to run these codes in VBA, the error message : Run-time error '424' : Object required appear on the screen. Any mistake ?


Regards


James
 
James


Firstly, Welcome to the Chandoo.org forums


Have you considered that this question may be best asked of the Mathwave people?


It is highly unlikely that anybody here will be expert in Mathwave, I for one have never heard of it.
 
The problem is that we are unlikely to know or understand the syntax of the functions they use
 
Hi James ,


When posting about an error in VBA code , always indicate the line which has generated the error ; in case this is not displayed , step through the code by placing the cursor anywhere in the code , and pressing the F8 key. When an error statement is executed , the yellow highlight will indicate the offending line of code.


If it is the line :


Range("a1").Value = Rnum


then you can probably try changing it to :


ActiveSheet.Range("a1").Value = Rnum


Narayan
 
Hi Narayan,


Can I send you the excel files and then you check the macro for me ?


I have to send you the add-in program from mathwave.com to you as well or you can download from mathwave.com : http://www.mathwave.com/downloads/easyfit-setup.exe


Your email address please.


James
 
Hi james989!


No Doubt.. EasyFit may be a Best Software in Data Analysis & Simulation..

and it may have various option..

http://www.mathwave.com/popup.html-topic=easyfitxl_functions&lang=en&w=495&product=easyfit


however, above function (according to the name) may be just

Random Number Generator with No Duplicate..


Is this what, you want to achive!!!


Regards,

Deb
 
Hi,


Actually I have two excel files, namely :-


1)EasyFitXL-TRY1.xlsm

2)EasyFitXL-TRY2.xlsm


Both file have the same macros(100% same ! I just copy all macros from ***-TRY1 to a new file ***-TRY2 !). However, macro for file EasyFitXL-TRY1.xlsm can be ran smoothly but macro for EasyFitXL-TRY2.xlsm will give error message !


James
 
To upload a file .. you can use any file sharing website.. and paste here the link..


Refer : http://chandoo.org/forums/topic/posting-a-sample-workbook


Regards,

Deb
 
James


In Excel goto VBA Alt-F11

Tools

References

Scroll down and find the EasyFit 1.0 Type Library

Put a Tick in the box to the left

Ok to close the dialog


Your code should now work
 
Back
Top