Error in 』 で on VBA SPLIT

Asked 2 years ago, Updated 2 years ago, 52 views

Thank you for your help.

In Excel or Access VBA, if 』 が is included in the string, the error
There is insufficient string space. Problem, I think it's already been collected for a long time, but the root solution to this problem is still
I wonder if it hasn't been done yet.
As it stands, str=Replace(str, " "", "") just before the error occurs. I'm trying to avoid it, but is there a way to prevent this error from occurring?
This method will result in changes to the data, so it is not acceptable.

Please let me know if there is a fundamental solution (such as adding some configuration to Office itself).

Thank you for your cooperation.

vba

2022-09-29 22:24

1 Answers

The new version of Office does not seem to cause such problems.
According to this site,

It seems to be a bug brought in from AC2007.
3/03/2010 Note: Access 2010 does not seem to fix this bug either.
April 10, 2014 Additional note: It seems that the latest version of Access 2013 has been resolved.

Therefore, it seems that this bug only occurs in certain versions.

Also, I tried to execute the following code in Excel 2013 and found no errors.

Sub SplitTest()
    Dimrec As String
    Dima() As String
    rec="7202.T, Isuzu Motors Co., Ltd., 4/30, 303,"
    a=Split(rec, ", ", , vbTextCompare)
    Debug.Print a(0), a(1), a(2), a(3), a(4)
End Sub

Therefore, if it is a fundamental solution, wouldn't it be to upgrade the Excel and Access versions?
I don't think Microsoft will bug fix the older version of Excel or Access anymore.


2022-09-29 22:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.