Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default More problems witn Benford's law application

I am still trying to get the Benford's law application to run. The
application creates the variables for running the application. The variables
are as follows:
Dim One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Zero, firstone
Dim Row As Long, Col As Long, Step As Long, Ez
Dim Z As Long, Total
Dim Digits As Long
Dim X, I

The application goes through three loops to count and accumulate the
relevant data. The last loop is to enter the counts of the first two digits
test into a worksheet. That part of the procedure is as follows:
Worksheets(4).Select
Range("3").Select

For I = 10 To 99
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Arraytwotest(I)
Next I

This part of requires the definition of I set forth in the variable
definitions but I keep getting an error message in the last line of the
variable definition "Dim X, I" I know I am overlooking something obvious but
this is all new to me. Any help will be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default More problems witn Benford's law application

If the "I" character is not part of the alphabet then you
will get an error.
Also, unless you declare the data type for each variable it will be a variant.

--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Sody"
wrote in message
I am still trying to get the Benford's law application to run. The
application creates the variables for running the application. The variables
are as follows:
Dim One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Zero, firstone
Dim Row As Long, Col As Long, Step As Long, Ez
Dim Z As Long, Total
Dim Digits As Long
Dim X, I
The application goes through three loops to count and accumulate the
relevant data. The last loop is to enter the counts of the first two digits
test into a worksheet. That part of the procedure is as follows:
Worksheets(4).Select
Range("3").Select
For I = 10 To 99
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Arraytwotest(I)
Next I
This part of requires the definition of I set forth in the variable
definitions but I keep getting an error message in the last line of the
variable definition "Dim X, I" I know I am overlooking something obvious but
this is all new to me. Any help will be appreciated.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default More problems witn Benford's law application

I understand that I have to set the definition and declare the data type, but
I can't figure out how to accomplish that. Everything that I have tried has
resulted in an error. I realize it is something obvious, but I just can't
see it.

"Jim Cone" wrote:

If the "I" character is not part of the alphabet then you
will get an error.
Also, unless you declare the data type for each variable it will be a variant.

--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Sody"
wrote in message
I am still trying to get the Benford's law application to run. The
application creates the variables for running the application. The variables
are as follows:
Dim One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Zero, firstone
Dim Row As Long, Col As Long, Step As Long, Ez
Dim Z As Long, Total
Dim Digits As Long
Dim X, I
The application goes through three loops to count and accumulate the
relevant data. The last loop is to enter the counts of the first two digits
test into a worksheet. That part of the procedure is as follows:
Worksheets(4).Select
Range("3").Select
For I = 10 To 99
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Arraytwotest(I)
Next I
This part of requires the definition of I set forth in the variable
definitions but I keep getting an error message in the last line of the
variable definition "Dim X, I" I know I am overlooking something obvious but
this is all new to me. Any help will be appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default More problems witn Benford's law application

Please provide the line of code that is causing the error.
(not the line number or the "last line" but the actual text)

Also provide the text of the error message.
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html



"Sody"
wrote in message
I understand that I have to set the definition and declare the data type, but
I can't figure out how to accomplish that. Everything that I have tried has
resulted in an error. I realize it is something obvious, but I just can't
see it.



"Jim Cone" wrote:
If the "I" character is not part of the alphabet then you
will get an error.
Also, unless you declare the data type for each variable it will be a variant.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default More problems witn Benford's law application

The line where the macro stops is
Dim X, I

The error message is run time error 1004, application-defined or
object-defined error.

If I take that line out and remove the last part of the macro that takes the
calculated numbers and posts to worksheet 4 the macro runs fine. However
that calculation and the posting to worksheet 4 is an important part of the
fraud analysis.
Thanks for your help.

"Jim Cone" wrote:

Please provide the line of code that is causing the error.
(not the line number or the "last line" but the actual text)

Also provide the text of the error message.
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html



"Sody"
wrote in message
I understand that I have to set the definition and declare the data type, but
I can't figure out how to accomplish that. Everything that I have tried has
resulted in an error. I realize it is something obvious, but I just can't
see it.



"Jim Cone" wrote:
If the "I" character is not part of the alphabet then you
will get an error.
Also, unless you declare the data type for each variable it will be a variant.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default More problems witn Benford's law application

This is just a guess, but maybe the file is corrupted.
Try replacing the offending line with different variables and
replace every instance of their use in the code.

From...
Dim X, I

To...
Dim vX as Variant
Dim lngN as Long

Beyond that, I don't have much of a clue.
Jim Cone
San Francisco, USA



"Sody"
wrote in message
The line where the macro stops is
Dim X, I

The error message is run time error 1004, application-defined or
object-defined error.
If I take that line out and remove the last part of the macro that takes the
calculated numbers and posts to worksheet 4 the macro runs fine. However
that calculation and the posting to worksheet 4 is an important part of the
fraud analysis.
Thanks for your help.



"Jim Cone" wrote:

Please provide the line of code that is causing the error.
(not the line number or the "last line" but the actual text)

Also provide the text of the error message.-
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html



"Sody"
wrote in message
I understand that I have to set the definition and declare the data type, but
I can't figure out how to accomplish that. Everything that I have tried has
resulted in an error. I realize it is something obvious, but I just can't
see it.





"Jim Cone" wrote:
If the "I" character is not part of the alphabet then you
will get an error.
Also, unless you declare the data type for each variable it will be a variant.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


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
Application.Calculation Problems Jive Excel Worksheet Functions 2 February 7th 08 02:21 PM
type mismatch error in Benford's law macro Sody Excel Programming 1 May 24th 06 11:07 PM
Problems using Application.IgnoreRemoteReferences JGeniti Excel Programming 2 August 12th 05 01:33 PM
Problems with Excel VBA application [email protected] Excel Programming 2 June 12th 05 05:38 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"