Bharanee

Hi,

in my application i'm using string to be enter in a textbox. I've to use the cell reference for that textbox too. The scenario as follows,

There will be a text in any one of the cell in sheet. The user will open a form and there is a text box.In next to that i've to give the cell reference icon, when the user clicks the icon, it should open a separate window and cell reference should appear in the wndow. Once user hits enter, the cell nmber alone should display in the text box.

Let me get solution for the above. The function need is same as in the norma Excel -->Insert-->Formula. I need the code for this.

If the solution reaches me in short,it ll be more helpful.

Thanks




Re: Visual Studio Tools for Office Giving Cell Reference for String

Dennis Wallentin

Hi Bgaranee,

Is the following something that can get You started

Code Snippet

Dim CellAddress As Excel.Range = Globals.ThisAddIn.Application.InputBox( _

Prompt:="Please select a cell:", _

Title:="My addin", _

Default:=Globals.ThisAddIn.Application.ActiveCell.Address, _

Type:=8)

MessageBox.Show(CStr(CellAddress.Address))






Re: Visual Studio Tools for Office Giving Cell Reference for String

Bharanee

Thanks Dennis. Let me check.