I am tyring to run JavaScript through VBA in Excel.
IE.document.parentWindow.execScript "javascript:__doPostBack('ctl00$ContentPlaceHolder1$GridView1','Edit$0')"
The above code works fine.
I am tyring to click another link through following code which is running a JavaScript. But I am getting an "expected end of statement" error.
IE.document.parentWindow.execScript "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$GridView1$ctl02$ctl00", "", true, "", "", false, true))"
I have also tried using double quotes " like
""ctl00$ContentPlaceHolder1$GridView1$ctl02$ctl00""
The error has gone but it did not run the script.
\"