There are several textboxes in an excel file as ActiveX objects and I want to reach them from codebehind.
I am using ClosedXML for other fields, but I am open for ot
You can make file in VBA (in %appdata% folder), and save textboxes value in this file (by example, .ini file).
And after that open file in C#.
' PtrSafe for 64bit (for 32bit, remove it)
Private Declare PtrSafe Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" _
(ByVal lpApplicationName As String, ByVal lpKeyName As Any, _
ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Sub TextBox1_Change()
WritePrivateProfileString "Page1", "TextBox1", TextBox1.Text, "C:\Users\HS\Desktop\exceltab.ini"
End Sub
[Page1]
TextBox1=ok