PC Review


Reply
Thread Tools Rate Thread

why errormessage?

 
 
Jack Sons
Guest
Posts: n/a
 
      14th Sep 2004
Hi all,

I saw no response to my earlier post below, so I post again. Hope my
question is not too stupid to be answered.
----------------------------------------------------------------------------
-------------------------------------

Hi all,

The lines below cause my macro to halt with the error message : "error
determined by application" (or something like that, I translated from
Dutch). What could be wrong? When I put the formula in the normal way in
cell L1 it works fine.

Range("L1").Select
ActiveCell.FormulaR1C1 = "=""aantal cursisten
=""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"


Jack Sons
The Netherlands


 
Reply With Quote
 
 
 
 
Jazzer
Guest
Posts: n/a
 
      14th Sep 2004
Hi,

Could you also include the formula which you would like have as
result of this macro?

- Asse

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

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      14th Sep 2004
It worked fine for me in my USA version.

Is your worksheet protected?

Jack Sons wrote:
>
> Hi all,
>
> I saw no response to my earlier post below, so I post again. Hope my
> question is not too stupid to be answered.
> ----------------------------------------------------------------------------
> -------------------------------------
>
> Hi all,
>
> The lines below cause my macro to halt with the error message : "error
> determined by application" (or something like that, I translated from
> Dutch). What could be wrong? When I put the formula in the normal way in
> cell L1 it works fine.
>
> Range("L1").Select
> ActiveCell.FormulaR1C1 = "=""aantal cursisten
> =""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"
>
> Jack Sons
> The Netherlands


--

Dave Peterson
http://www.pcreview.co.uk/forums/(E-Mail Removed)
 
Reply With Quote
 
Jack Sons
Guest
Posts: n/a
 
      15th Sep 2004
Dave,

No protection at all.

When I put in L1 the formula "manual" it works fine, but
COUNTIF(R[1]:R[65526],""*-03-05"")
should be
COUNTIF(R[2]:R[65526],""*-03-05"") to avoid circular reference.

Putting the R[2]: in the code in stead of R[1]: doesn't help.Any other idea?

Jack.


"Dave Peterson" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> It worked fine for me in my USA version.
>
> Is your worksheet protected?
>
> Jack Sons wrote:
> >
> > Hi all,
> >
> > I saw no response to my earlier post below, so I post again. Hope my
> > question is not too stupid to be answered.

>
> --------------------------------------------------------------------------

--
> > -------------------------------------
> >
> > Hi all,
> >
> > The lines below cause my macro to halt with the error message : "error
> > determined by application" (or something like that, I translated from
> > Dutch). What could be wrong? When I put the formula in the normal way in
> > cell L1 it works fine.
> >
> > Range("L1").Select
> > ActiveCell.FormulaR1C1 = "=""aantal cursisten
> > =""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"
> >
> > Jack Sons
> > The Netherlands

>
> --
>
> Dave Peterson
> (E-Mail Removed)



 
Reply With Quote
 
Jack Sons
Guest
Posts: n/a
 
      15th Sep 2004
Dave,

On a blank sheet in a new workbook this works

Sub Macro2()
Range("L1").Select
ActiveCell.FormulaR1C1 = "=""aantal cursisten ="""
End Sub

but this won't

Sub Macro2()
Range("L1").Select
ActiveCell.FormulaR1C1 = "=""aantal cursisten = ""&COUNTA(C[-11])"
End Sub

Strange?!

Jack.

"Dave Peterson" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> It worked fine for me in my USA version.
>
> Is your worksheet protected?
>
> Jack Sons wrote:
> >
> > Hi all,
> >
> > I saw no response to my earlier post below, so I post again. Hope my
> > question is not too stupid to be answered.

>
> --------------------------------------------------------------------------

--
> > -------------------------------------
> >
> > Hi all,
> >
> > The lines below cause my macro to halt with the error message : "error
> > determined by application" (or something like that, I translated from
> > Dutch). What could be wrong? When I put the formula in the normal way in
> > cell L1 it works fine.
> >
> > Range("L1").Select
> > ActiveCell.FormulaR1C1 = "=""aantal cursisten
> > =""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"
> >
> > Jack Sons
> > The Netherlands

>
> --
>
> Dave Peterson
> (E-Mail Removed)



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      15th Sep 2004
I don't have a solution, but maybe you could try this:

Switch your workbook to R1C1 reference style (if you're not using it now).
then have your code put the same formula, but start with $= instead of just =.

Since this is just a string, it won't cause an error.

Now switch back to excel and change that formula manually. (remove the leading
$).

See if/how excel yells.





Jack Sons wrote:
>
> Dave,
>
> No protection at all.
>
> When I put in L1 the formula "manual" it works fine, but
> COUNTIF(R[1]:R[65526],""*-03-05"")
> should be
> COUNTIF(R[2]:R[65526],""*-03-05"") to avoid circular reference.
>
> Putting the R[2]: in the code in stead of R[1]: doesn't help.Any other idea?
>
> Jack.
>
> "Dave Peterson" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed)...
> > It worked fine for me in my USA version.
> >
> > Is your worksheet protected?
> >
> > Jack Sons wrote:
> > >
> > > Hi all,
> > >
> > > I saw no response to my earlier post below, so I post again. Hope my
> > > question is not too stupid to be answered.

> >
> > --------------------------------------------------------------------------

> --
> > > -------------------------------------
> > >
> > > Hi all,
> > >
> > > The lines below cause my macro to halt with the error message : "error
> > > determined by application" (or something like that, I translated from
> > > Dutch). What could be wrong? When I put the formula in the normal way in
> > > cell L1 it works fine.
> > >
> > > Range("L1").Select
> > > ActiveCell.FormulaR1C1 = "=""aantal cursisten
> > > =""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"
> > >
> > > Jack Sons
> > > The Netherlands

> >
> > --
> >
> > Dave Peterson
> > (E-Mail Removed)


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      15th Sep 2004
I don't deal with any international issues, but do you use an English version of
excel?

If no, maybe using your language's version of =counta() would help. (I was
under the impression that you wrote the formula in VBA in English and it would
convert to your native tongue.

In fact, I thought you would have to use:
activecell.FormulaR1C1Local = ...
to use your non-english functions.

(well, that's the way I understand the help in VBA.)




Jack Sons wrote:
>
> Dave,
>
> On a blank sheet in a new workbook this works
>
> Sub Macro2()
> Range("L1").Select
> ActiveCell.FormulaR1C1 = "=""aantal cursisten ="""
> End Sub
>
> but this won't
>
> Sub Macro2()
> Range("L1").Select
> ActiveCell.FormulaR1C1 = "=""aantal cursisten = ""&COUNTA(C[-11])"
> End Sub
>
> Strange?!
>
> Jack.
>
> "Dave Peterson" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed)...
> > It worked fine for me in my USA version.
> >
> > Is your worksheet protected?
> >
> > Jack Sons wrote:
> > >
> > > Hi all,
> > >
> > > I saw no response to my earlier post below, so I post again. Hope my
> > > question is not too stupid to be answered.

> >
> > --------------------------------------------------------------------------

> --
> > > -------------------------------------
> > >
> > > Hi all,
> > >
> > > The lines below cause my macro to halt with the error message : "error
> > > determined by application" (or something like that, I translated from
> > > Dutch). What could be wrong? When I put the formula in the normal way in
> > > cell L1 it works fine.
> > >
> > > Range("L1").Select
> > > ActiveCell.FormulaR1C1 = "=""aantal cursisten
> > > =""&COUNTA(C[-11])+COUNTA(C[-5])-COUNTIF(R[1]:R[65526],""*-03-05"")-1"
> > >
> > > Jack Sons
> > > The Netherlands

> >
> > --
> >
> > Dave Peterson
> > (E-Mail Removed)


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger Microsoft ASP .NET 4 21st Dec 2006 02:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger Microsoft ASP .NET 2 2nd Dec 2006 04:46 PM
HELL Reinstalling XP WHY WHY WHY ??? Paul M Windows XP Help 9 27th Feb 2005 09:49 AM
Why?Why?Why?Why? Doug Microsoft Word New Users 4 8th Jun 2004 05:28 PM
*****Can't Hibernate... Why? Why? Why?***** Papa Smurf Windows XP General 2 3rd Jan 2004 12:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:18 AM.