Stacy Rueda

Board Regular
Joined
Jun 23, 2016
Messages
87
Hi!

I have here macro vb code that boss gave me to operate but every time I click File export button on my excel file I have error that says "Compile error: Missing end bracket". please help me with this..Thank you in advance

Error was found in first line -->Public Sub NIGˆË—Šƒf�[ƒ^�ì�¬()

Public Sub NIGˆË—Šƒf�[ƒ^�ì�¬()


Dim columns As Integer

Dim strFNAME As String 'ƒtƒ@ƒCƒ‹–¼•Û‘¶—p
strFNAME = ActiveWorkbook.Path & "\irai_result.txt"


Call MAKE_CSV_FILE(6, strFNAME)


End Sub
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
That's not a valid procedure name.

How about instead

Code:
Public Sub Stacy()
 
Upvote 0
Hi thank you for reply..this is japanese file, every time I changed NIGˆË—Šƒf�[ƒ^�ì�¬() into NIGRequirements() i also have error that says "Cannot run the macro" filename.xlsm!This workbook.NIG(Japanese characters). The macro may not be available in this workbook or all macros may be disabled.
 
Upvote 0
Hi shg, this is the complete macro code

Public Sub NIGˆË—Šƒf�[ƒ^�ì�¬()


Dim columns As Integer

'ƒtƒ@ƒCƒ‹–¼‚ð�ì�¬ ƒtƒ@ƒCƒ‹–¼‚ÍŽ©•ª‚̃pƒX+\test.html
Dim strFNAME As String 'ƒtƒ@ƒCƒ‹–¼•Û‘¶—p
strFNAME = ActiveWorkbook.Path & "\irai_result.txt" 'ƒtƒ@ƒCƒ‹–¼‚ð�ì‚é


'ƒe�[ƒuƒ‹ƒf�[ƒ^‚ð�ì�¬‚·‚éˆø�”�F(ƒtƒB�[ƒ‹ƒh�”,ƒtƒ@ƒCƒ‹–¼)
Call MAKE_CSV_FILE(6, strFNAME)


End Sub
'ƒtƒ@ƒCƒ‹–¼‚ƃZƒ‹‚͈̔ÍRANGE‚ðŽó‚¯Žæ‚è�A
'ƒtƒ@ƒCƒ‹‚ðŠJ‚«ƒJƒ“ƒ}‹æ�Ø‚è‚̃tƒ@ƒCƒ‹‚ð�ì�¬‚·‚é
Sub MAKE_CSV_FILE(iColumns As Integer, strFNAME As String)


'ƒtƒ@ƒCƒ‹‚ðƒI�[ƒvƒ“‚·‚é
Dim FNO As Integer 'ƒtƒ@ƒCƒ‹”Ô�†
FNO = FreeFile '‹ó‚¢‚Ä‚éƒtƒ@ƒCƒ‹”Ô�†‚ðŽæ�o‚·
Open strFNAME For Output As #FNO 'ƒeƒLƒXƒgƒtƒ@ƒCƒ‹‚ð�V‹K�ì�¬


'�s�A—ñ‚Ń‹�[ƒv‚ð�ì‚é
Dim y As Integer
Dim x As Integer
y = 4
Do While Cells(y, 1) <> ""


For x = 1 To iColumns '—ñƒ‹�[ƒv

If Cells(y, x) <> "" Then
If x = 1 Then
Print #FNO, Cells(y, x);
Else
Print #FNO, Chr(9) & Cells(y, x);
End If
Else
Print #FNO, Chr(9);
End If

Next x

Print #FNO, "" '‰ü�s‚Ì‚Ý�o—Í
y = y + 1
Loop


'ƒtƒ@ƒCƒ‹‚ðƒNƒ��[ƒY‚·‚é
Close #FNO


End Sub
 
Upvote 0
I have zero experience in using Excel in other languages. Perhaps someone else can help, Stacy.

Good luck.
 
Upvote 0
Are you copying the code directly from Excel VBA into your posts here?
 
Upvote 0
I don't know if this will work: change the font in the VBA editor.

Under Tools >> Options >> Editor Format >> Font:
Select a font where the Japanese characters display correctly.
Try running the macro.
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,365
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top