Sub SheetEdit()
Rows(1).EntireRow.Delete
Rows(2).EntireRow.Delete
Rows(3).EntireRow.Delete
Columns(1).EntireColumn.Delete
End Sub
but in the Excel I see my code
Sub SheetEdit()
Rows(1).EntireRow.Delete
Rows(2).EntireRow.Delete
Rows(3).EntireRow.Delete
Columns(1).EntireColumn.Delete
End Sub
Like this I can delete " " then this code work how can I use this code with UiPath and also If I start my process I take Invoke VBA: Cannot run the macro ‘CopyPasteSheetAsValues’. The macro may not be available in this workbook or all macros may be disabled. this error (all of my excel permissions are allowed)
The macro name you have given is SheetEdit right? And i assume in invoke vba you are using CopyPasteSheetAsValues. That is the reason you are getting macro not found error.
This error definitely seems to be because of the wrong name since you are using Invoke VBA, since permissions are all allowed and you are not using execute macro.
about the other error due to unknown charcter you can try the following, you might have already tried though
Remove BOM: Open your VBA code in a text editor (like Notepad), delete any characters before the “Sub SheetEdit()” line, and then save the file.
Check Encoding: Ensure that your VBA code is saved with the correct encoding. Save it with UTF-8 encoding without BOM.
Re-paste Code: If you’re pasting the code into the “Invoke VBA” activity directly, try copying the cleaned code from your text editor and pasting it again.