able to insert/delete rows in locked spread

Posted by: ginacresse on 8 September 2017, 1:02 pm EST

  • Posted 8 September 2017, 1:02 pm EST

    <P>I'm using this code to lock a spread control on my form:</P><FONT size=2>
    <P></FONT><FONT color=#0000ff>Case</FONT> <FONT color=#a31515>"FpSpread"</P></FONT>
    <P>Ctrl.Enabled = <FONT color=#0000ff>True</FONT> <FONT color=#008000>'rather than disable, just lock the spread so it can be scrolled but not changed</P></FONT>
    <BLOCKQUOTE dir=ltr>
    <P><FONT color=#0000ff>With</FONT> Ctrl</P>
    <BLOCKQUOTE dir=ltr>
    <P><FONT color=#0000ff>With</FONT> .ActiveSheet</P>
    <BLOCKQUOTE dir=ltr>
    <P>.DefaultStyle.Locked() = <FONT color=#0000ff>True</P></BLOCKQUOTE></FONT>
    <P><FONT color=#0000ff>End</FONT> <FONT color=#0000ff>With</P></BLOCKQUOTE></FONT>
    <P><FONT color=#0000ff>End</FONT> <FONT color=#0000ff>With</P></BLOCKQUOTE></FONT>
    <P><FONT color=#0000ff>Case</FONT> <FONT color=#0000ff>Else...</FONT></P>
    <P><FONT color=#0000ff><FONT color=#000000>But even though the spread is locked, I'm still able to Insert and Delete rows.  Am I not locking the spread properly?  I don't want the user to be able to do anything but look at the spread.</FONT></FONT></P>
    <P><FONT color=#0000ff><FONT color=#000000>Thanks.</FONT></P></FONT>
  • Replied 8 September 2017, 1:02 pm EST

    Locking the spread only prevents the user from entering edit mode in the sheet to enter data.  But you must be providing them a way to add or delete rows since there is nothing built in the spread to do this.  I would suggest disabling whatever mechanism you have set up for them to do this.<br>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels