Auto Conversion of Number to is getting Failed in excel 2007

Y

Yuvaraj Mani

I have a Macro which imports the data from the excel 2007 and create a new
formatted excel 2007 Report file .

When importing the data from the input excel file, in certain machine the
number imported from the input text file was taken as string and throws 'type
mismatch' error also I found that I have to use different option to go to
debug mode.

Please let me know is there any option available to make number to be number
instead of text .So that the error would not occur
 
J

Jacob Skaria

Refer your previous post for responses from Mike and Joel..

You can handle that in your code using functions like Val() IsNumeric() etc;

If this post helps click Yes
 
Y

Yuvaraj Mani

Thanks for the reply.
My code:
******
Dim aVar as Integer
aVar = Sgn(spreadsheet.cells(1,1))
On executing the above line (Sgn) I'm getting the error "Type Mismatch".

This error occurs only in the Professional edition of Excel 2007 but this
api was working fine in Enterprise edition. I know we can use Val to overcome
this issue but I want to keep the existing function Sgn() to work without
using Sgn(Val()).

I wanted to know whether there could be any configuration setting set while
installing or later in the Professional edition of Excel 2007 which causes
the above error


other finding's from the professional edition of excel 2007 where this error
occurs is that,
1) Developer tab is also not enabled ,
2) The VBScript editor can't be opened by pressing the key Alt+F11(but this
is possible in enterprise edition).
 
Y

Yuvaraj Mani

Hi,

I identified root cause to the Problem is with Regional settings of the
Users Machine.

For the Users(example Poland Users) Whose Digit Group Code option
Configuration is blank on the Regional settings this error Occured.

For that I have reset the blank space on the Digit Group Code with Dot
Value(.) and the error got resolved.

But I wanted to know will there be any impact on changing the regional
settings of the Poland user from the blank space with Dot value



So I







Regards

Yuvaraj Mani
 

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

Top