Can you create a reference to a sheet on another Win form

Posted by: jarlath on 8 September 2017, 2:47 pm EST

  • Posted 8 September 2017, 2:47 pm EST

    I have my main sheet on one windows form.   However, I want to use a formula to reference a cell in a sheet on a completely different form.  I searched through the forums and documentation, but could not find this.  Is it possible and if so, how?


    Thanks

  • Replied 8 September 2017, 2:47 pm EST

    Not possible, a formula in a spread cell cannot reference a cell in another spread, best you can do is cross sheet references
  • Replied 8 September 2017, 2:47 pm EST

    Thanks.  It is unfortunate though and Hope you consider that a future enhancement. 


    So, can I do this.  I will write back the amount from the source sheet to a database.   And, I will reference the database in the main sheet.   Can I create a hyperlink or something to at least bring up the source sheet from the main sheet.  This way it would at least appear they are linked.


      


     

  • Replied 8 September 2017, 2:47 pm EST

    Hello,

    If the other spread sheet is on a different Form you can access that Form in the same application and also get the values from the main Spread sheet.

     
    Private Sub FpSpread1_CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick

            If e.Column = 1 And e.Row = 1 Then

                FpSpread2.Visible = True ' if spread2 is on the same Form

                Form2.Show()             'if Spread2 is on another Form
            Form1.Fpspread1.Sheets(0).Cells(0,0).Vlaue= Form2.Fpspread2.Sheets(0).Cells(0,0).Value         
            Else

                FpSpread2.Visible = False

            End If

     
        End Sub

    Let me know if this is not what you are looking for.

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels