Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Error 1004: application or object defined error

Hi

I upload a bunch of information to a sheet, including simple formulas
like =A1/A2 etc.

There is one IF, and that causes the error:

Worksheets("Start").Cells(j, 6) = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

I have tried Worksheets("Start").Cells(j, 6).Formula but that does not
change much
If I remove the equals (=) sign, then it works, and I can add it
afterwards manually, and it will work. The formula is correct, I just
can set it.

I even added a DoEvents before - no change.

What do I do wrong here?
I browsed the group, but did not find anything on this specific case.

WBR
Sonnich
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Error 1004: application or object defined error

Worksheets("Start").Cells(j, 6).Formula = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

--
If this post helps click Yes
---------------
Jacob Skaria


"jodleren" wrote:

Hi

I upload a bunch of information to a sheet, including simple formulas
like =A1/A2 etc.

There is one IF, and that causes the error:

Worksheets("Start").Cells(j, 6) = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

I have tried Worksheets("Start").Cells(j, 6).Formula but that does not
change much
If I remove the equals (=) sign, then it works, and I can add it
afterwards manually, and it will work. The formula is correct, I just
can set it.

I even added a DoEvents before - no change.

What do I do wrong here?
I browsed the group, but did not find anything on this specific case.

WBR
Sonnich

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Error 1004: application or object defined error

hi
if i am reading correctly, your formula seems to have simi colons instead of
commas. try this.
Worksheets("sheet1").Cells(6, "j") = "=if(B7=0,E" & sLine & ",E" & sLine &
"/B7)"

regards
FSt1

"jodleren" wrote:

Hi

I upload a bunch of information to a sheet, including simple formulas
like =A1/A2 etc.

There is one IF, and that causes the error:

Worksheets("Start").Cells(j, 6) = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

I have tried Worksheets("Start").Cells(j, 6).Formula but that does not
change much
If I remove the equals (=) sign, then it works, and I can add it
afterwards manually, and it will work. The formula is correct, I just
can set it.

I even added a DoEvents before - no change.

What do I do wrong here?
I browsed the group, but did not find anything on this specific case.

WBR
Sonnich

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Error 1004: application or object defined error

Oops...Review your formula closely to identify the semicolons . It should be
commas

--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Worksheets("Start").Cells(j, 6).Formula = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

--
If this post helps click Yes
---------------
Jacob Skaria


"jodleren" wrote:

Hi

I upload a bunch of information to a sheet, including simple formulas
like =A1/A2 etc.

There is one IF, and that causes the error:

Worksheets("Start").Cells(j, 6) = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"

I have tried Worksheets("Start").Cells(j, 6).Formula but that does not
change much
If I remove the equals (=) sign, then it works, and I can add it
afterwards manually, and it will work. The formula is correct, I just
can set it.

I even added a DoEvents before - no change.

What do I do wrong here?
I browsed the group, but did not find anything on this specific case.

WBR
Sonnich

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Error 1004: application or object defined error

On Apr 17, 7:12*pm, FSt1 wrote:
hi
if i am reading correctly, your formula seems to have simi colons instead of
commas. try this.
Worksheets("sheet1").Cells(6, "j") = "=if(B7=0,E" & sLine & ",E" & sLine &
"/B7)"

regards
FSt1

"jodleren" wrote:
Hi


I upload a bunch of information to a sheet, including simple formulas
like =A1/A2 etc.


There is one IF, and that causes the error:


* * Worksheets("Start").Cells(j, 6) = "=if(B7=0;E" & sLine & ";E" &
sLine & "/B7)"


I have tried Worksheets("Start").Cells(j, 6).Formula but that does not
change much
If I remove the equals (=) sign, then it works, and I can add it
afterwards manually, and it will work. The formula is correct, I just
can set it.


I even added a DoEvents before - no change.


What do I do wrong here?
I browsed the group, but did not find anything on this specific case.


WBR
Sonnich


That was it.
God, I could not see the forest, there were some trees in front of it.

WBR & thanks
Sonnich
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 '1004': Application defined or Object defined error [email protected] Excel Programming 2 March 13th 09 11:49 AM
Run-Time error 1004 Application defined or object defined error - WirelessPete Excel Programming 0 January 12th 09 11:00 PM
Export a chart in a GIF file. Run-time error '1004': Application-defined or object-defined error; [email protected] Excel Programming 4 September 16th 07 11:09 PM
Run-time Error 1004: Application-defined or Object-defined Error Adrian Excel Programming 6 August 23rd 05 06:28 AM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


All times are GMT +1. The time now is 05:57 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"