Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application-Defined or Object Define error? Help please.

I am trying to fill a cell with a formula and I have tried everythin
but I keep getting:

Error 1004: Aplication-Defined or Object-Defined error

Basically here is the line I try to enter the fornula


Cells(Fzc, 17) = "=IF(M" + CStr(Fzc) + "=0;L" + CStr(Fzc) + "*Q$"
CStr(n + 1) + ";0)"


I have also tried

Cells(Fzc, 17) .FormulaR1C1 = "=IF(RC[-4]=0;RC[-3]*R[n+1]C;0)"

There is nothing wrong apparently, Fzc is a long and n an Integer, bu
even if I change the variables to numbers fro testing still the sam
error.

If I take away the "=" from the string it works fine otherwise I ge
the error.

Hope someone has an idea why.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Application-Defined or Object Define error? Help please.

Try replacing all of the + signs (except the n+1) with &

"NooK " wrote in message
...
I am trying to fill a cell with a formula and I have tried everything
but I keep getting:

Error 1004: Aplication-Defined or Object-Defined error

Basically here is the line I try to enter the fornula


Cells(Fzc, 17) = "=IF(M" + CStr(Fzc) + "=0;L" + CStr(Fzc) + "*Q$" +
CStr(n + 1) + ";0)"


I have also tried

Cells(Fzc, 17) .FormulaR1C1 = "=IF(RC[-4]=0;RC[-3]*R[n+1]C;0)"

There is nothing wrong apparently, Fzc is a long and n an Integer, but
even if I change the variables to numbers fro testing still the same
error.

If I take away the "=" from the string it works fine otherwise I get
the error.

Hope someone has an idea why.

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application-Defined or Object Define error? Help please.

As I said I have tried everything with RC1 notation but when I tried th
other notation (With String concatenation) with FormulaLocal it worked
or replacing the ; did the same job.

Thanks for the help and sorry for any bothering.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

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
Macro error : Application-defined or object-defined error Joe Excel Discussion (Misc queries) 3 January 27th 06 02:32 PM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM
Application-defined or object-defined error Meihua Liang Excel Programming 0 September 8th 03 07:25 PM
Runtime Error 1004 -- Application Defined or Object Defined Error John[_51_] Excel Programming 3 September 4th 03 04:28 PM


All times are GMT +1. The time now is 05:15 PM.

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"