Run-Time Error '-536608719 (e0040031)': Whats the problem?

  • Thread starter Thread starter Shaka215
  • Start date Start date
S

Shaka215

Fellow Programmers!

I am having a hard time figuring out how to get the following formula
to work inside of a macro...I have created a userform with a EXCEL
SPREADSHEET INSIDE OF A USER FORM (AS IT IS AVAILABLE AS A VBA PLUG-IN
[ADDITIONAL TOOLS] VERSION 12. The problem is the fact that the code
works fine if it used three times but if its used anymore after three
times it causes an error message stating the following as shown
below...

The objective is to allow the ability to enter a sequence of numbers
with as many periods between the numbers as the enduser wants...for
example...

1234.1234.1234.1234.1234.1234.1234.1234...etc


===============================
Run-Time Error '-536608719 (e0040031)':


The formula you typed contains an error.


For information about fixing common formula problems, see Help.


If you are not trying to enter a foormula, avoid using an equals sign
(=) or minus sign (-), or precede it with a single quotation mark (')
===============================


CODE
--------


CALC.ActiveCell.Value = "=" & ActiveCell.Value & "&Z5000"


How it appears on the spreadsheet
--------------------------------------------------
=12345.


ActiveCell.Value = 12345
Z5000 = . (PERIOD)


The PERIOD is neccessary as it is making the number have .00 but I
wouldn't see why it would be crashing the program as it works fine in
the NORMAL style Excel Spreadsheet...


Any help is greatly appreciated!!!
 
just as the error message says, since you are not writing a formula don't
use the equal sign

CALC.ActiveCell.Value = "'" & ActiveCell.Value & "."

if you want it to be a formula

CALC.ActiveCell.Value = "=""" & ActiveCell.Value & """&Z5000"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top