Invoke VBA acitivity, language character problem

I need to execute a VBA script but when i try to use invoke VBA activity the character inside the script changes. The original script inside a .txt file ;

Sub ClickMultiple()

’ ClickMultiple Macro
’ click select multiple


ActiveSheet.PivotTables(“PivotTable1”).PivotFields(“yıl”).ClearAllFilters
With ActiveSheet.PivotTables(“PivotTable1”).PivotFields(“yıl”)
.PivotItems(“2020”).Visible = True
.PivotItems(“(blank)”).Visible = True
End With
ActiveSheet.PivotTables(“PivotTable1”).PivotFields(“yıl”). _
EnableMultiplePageItems = False
ActiveSheet.PivotTables(“PivotTable1”).PivotFields(“yıl”).CurrentPage = “(All)”
End Sub

------- (“yıl”) it is a turkish word. and when the activity runs it converts this word to this ; (“yıl”)

“ı” is a turkish character

How can i fix this? Does anyone have any idea?

Hi @Arif_Kilic

Please try writing the macro in an xlsm formatted excel file and call the macro through execute macro activity.

Thanks

Hi Mr. @prasath_S

Unfortunately it is not allowed to change the extension. The excel file is fixed in a folder and has extension .xlsx

Hi @Arif_Kilic do you have access to create excel files?, if yes create an excel with the extension xlsm…

and write your macro in the file.

Thanks

i have to run this macro in that excel file. is there a way to run in .xlsx file? it is a huge excel file which contains multiple pages and as i said it is not allowed to convert its’ extension to .xlsm

@Arif_Kilic please try this

  1. Create a excel file (.xlsm format).

  2. Create a module in macro editor(alt+f11) and copy paste the code.

  3. In the code add a line workbooks.open(“your xlsx file path”,false) iy will open your excel file.

And then use your code to select the filters in pivot table.

4.to run the macro faster for big files, try to add this to your code,
After first line.

With application
. displayalerts = false
.screenupdating = false
.enableevents = false
End with

We are not changing anything in the input file,we create an excel file (xlsm) and call the macro in it.

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.