web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unterminated string co...
Power Automate
Answered

Unterminated string constant - Using VBScript

(0) ShareShare
ReportReport
Posted on by 11

Hi Team,

 

I'm unable to find the issue why i'm getting "Unterminated string constant" using Vbscript Activity.

 

Script Details :

----------------------------------------------------------------------------------------------------------------------------------------------------

Option Explicit
''On error resume Next
Dim timeStamp,d,m,y,GetCurrentDate,num,ObjFSO,objLog,ExcelObject,Arg_InputFilePath,Arg_LogFilePath,Arg_SaveAs,Machine_Hours_Src_WorkBook,Kk_Mchns_HoursCMpltd_Sheet,Kk_Mchns_WIpByIdentWo_Sheet
Dim objConnection,bBackground,Arg_WorkingDay_Num

Arg_InputFilePath = ("%strcmpltMHPFilePath%")  ''Get The Input FIle NAme of Machine Hour pivots
Arg_LogFilePath = ("%strMachTrackerPath%")  ''get The Log FIle Path
Arg_WorkingDay_Num = ("%strCurrentWorkingDay%")  ''Get The Working Day Number
Arg_SaveAs = ("%strMachTrackerPath%")  ''Save As path

----------------------------------------------------------------------------------------------------------------------------------------------------

reference : 2 attachments

 

I'm getting error at highlighted red color location/variables.
I have tracker the variables by keeping one message box (Please find the attached Screenshot). so variable values are printing in message box.

 

Still I'm getting the same issue.

 

Please help me to resolve the issue.

 

Thanks.

Line38.PNG
Line39 Result.PNG
Line17.PNG
I have the same question (0)
  • Verified answer
    Mohammad_0840 Profile Picture
    11 on at

    Issue resolved.

    When we are passing variable from outside to Run Vbscript command, we need to make sure the variable is trimmed. Otherwise script will return "Error: Unterminated string constant".

    Hope this information will help to all friends.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard