Spreadsheet1_SheetChange in JScript

C

Chris Smith

Howdy,

I am trying to fire the excel spreadsheet event
sheetchange for my spreadsheet object, but not in VBScript
but JScript.

I am able to make this code work perfectly in VBScript
with this:

Sub Spreadsheet1_SheetChange(Sh, Target)
msgbox "whoah"
End Sub


but for some reason this jscript command:

function Spreadsheet1_SheetChange(Sh, Target) {
alert("Whoah");
}

does not work.

Lil' help?

Thanks

Chris Smith
 
D

Dan Ricker

Below is a JS event handler for the SpreadSheet
Sheetchange event.

The AppendEventInfo() function just adds the string
information to a TextArea on the page where this was used.

The ID/Name for the SpreadSheet object is "MySpreadSheet"

Due to issues with html/xml in the postings here, I
changed the LessThan and GreaterThan symbols to be {lt}
and {gt} respectively.

{lt}script language="jscript" for="Myspreadsheet"
event="SheetChange(Sh, Target)"{gt}
AppendEventInfo("Sh.Name=" + Sh.Name + ",
Target.Address=" + Target.Address);
{lt}/script{gt}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top