Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Strange error

Dear All,


ActiveSheet.Cells(iloop, 5).Value = "=Sum(F688:F727)*0,05"
This line triggers error 1004 Application defined or object difined error

\/
ActiveSheet.Cells(iloop, 5).Value = "Sum(F688:F727)*0,05"
If i ommit the = before Sum there is no error but the formular is not
correct!!

How do i solve this

Filip




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Strange error

try

ActiveSheet.Cells(iloop, 5).Value = "=Sum(F688:F727)*0,05"


ActiveSheet.Cells(iloop, 5)= application.Sum(range("F688:F727"))*1
or
ActiveSheet.Cells(iloop, 5).Value = application.Sum(range("F688:F727"))*1

--
Don Guillett
SalesAid Software

"Filips Benoit" wrote in message
...
Dear All,


ActiveSheet.Cells(iloop, 5).Value = "=Sum(F688:F727)*0,05"
This line triggers error 1004 Application defined or object difined error

\/
ActiveSheet.Cells(iloop, 5).Value = "Sum(F688:F727)*0,05"
If i ommit the = before Sum there is no error but the formular is not
correct!!

How do i solve this

Filip






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Strange error


I get the same error. Could it be that your regional settings are no
correct? I notices that you use 0,05 which will not work on my PC. I
I change your code to use 0.05, it works for me.

Go to Tools menu and select options. Check the International tab an
make sure decimal separator is set to comma (assuming that's what yo
use where you live).



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=27084

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Strange error

ActiveSheet.Cells(iloop, 5).Formula = "=Sum(F688:F727)*0.05"

Change the comma to a period.

Value would still work, but it is clearer to use Formula

--
Regards,
Tom Ogilvy




"Filips Benoit" wrote in message
...
Dear All,


ActiveSheet.Cells(iloop, 5).Value = "=Sum(F688:F727)*0,05"
This line triggers error 1004 Application defined or object difined error

\/
ActiveSheet.Cells(iloop, 5).Value = "Sum(F688:F727)*0,05"
If i ommit the = before Sum there is no error but the formular is not
correct!!

How do i solve this

Filip






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Strange error

There is no need to change the decimal separator setting. Formula (or in
this case Value) expects US English formatting in VBA.

--
Regards,
Tom Ogilvy

"kkknie" wrote in message
...

I get the same error. Could it be that your regional settings are not
correct? I notices that you use 0,05 which will not work on my PC. If
I change your code to use 0.05, it works for me.

Go to Tools menu and select options. Check the International tab and
make sure decimal separator is set to comma (assuming that's what you
use where you live).

K


--
kkknie
------------------------------------------------------------------------
kkknie's Profile:

http://www.excelforum.com/member.php...fo&userid=7543
View this thread: http://www.excelforum.com/showthread...hreadid=270849





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Strange error


Wow. That's not very "internationally correct". :)



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=27084

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Strange error

formulaLocal

will work with a localized formula. Where's the problem?

--
Regards,
Tom Ogilvy

"kkknie" wrote in message
...

Wow. That's not very "internationally correct". :)

K


--
kkknie
------------------------------------------------------------------------
kkknie's Profile:

http://www.excelforum.com/member.php...fo&userid=7543
View this thread: http://www.excelforum.com/showthread...hreadid=270849



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Strange error

Changing the comma to a period did the job.

Thanks

"Tom Ogilvy" wrote in message
...
ActiveSheet.Cells(iloop, 5).Formula = "=Sum(F688:F727)*0.05"

Change the comma to a period.

Value would still work, but it is clearer to use Formula

--
Regards,
Tom Ogilvy




"Filips Benoit" wrote in message
...
Dear All,


ActiveSheet.Cells(iloop, 5).Value = "=Sum(F688:F727)*0,05"
This line triggers error 1004 Application defined or object difined

error

\/
ActiveSheet.Cells(iloop, 5).Value = "Sum(F688:F727)*0,05"
If i ommit the = before Sum there is no error but the formular is not
correct!!

How do i solve this

Filip








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
strange error martinbarnes Excel Discussion (Misc queries) 3 April 1st 08 09:02 PM
strange error AD108 Excel Worksheet Functions 7 August 9th 06 09:22 AM
Strange error Andy Setting up and Configuration of Excel 1 April 18th 06 08:11 PM
Very strange error superkopite Excel Discussion (Misc queries) 3 February 19th 06 11:21 AM
Strange Error Message Michael Windmeier Excel Discussion (Misc queries) 0 December 3rd 04 08:18 AM


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