I have an excel file which work well with Excel 2007, now my company upgrade all PC to Windows 10 Enterprise v1809 and Office 2016, then it got error runtime error 5
.
Here is my code, the error throw from StrConv line,
Tried Google but no help, is there anyway may help me fix this problem?
Update 1:
I'm working with many Japanese documents so I've changed my system locale to Japanese (in Control Panel/Region/Administrative/System Locale)
Update 2:
I don't want to convert Kanji (Chinese characters in my source), I want to convert double-byte English characters (1F-2F
) to single-byte English character (1F-2F
)
Public Sub 階段問合せ書作成()
Dim Kaidan1 As Worksheet
Dim N_ws As Workbook
Dim WB As Workbook
Set WB = ActiveWorkbook
jigyousyo = Range("事業所")
kaidan_name1 = StrConv(Range("階数①").Value, vbNarrow)
kaidan_name2 = StrConv(Range("ŠK”‡A").Value, vbNarrow)