Search

InputBox VSTO

InputBox VSTO Sample.


InputBox “Type” Attribute
Value	Meaning
0===>	A formula
1===>	A number
2===>	Text (Default)
4===>	A logical value (True or False)
8===>	A cell reference, as a Range object
16==>	An error value, such as #N/A
64==>	An array of values

VB.NET
Dim myRng As Excel.Range
Dim xlApp As Excel.Application = Globals.ThisAddIn.Application
myRng = xlApp.InputBox("Prompt", "Title", 8)

C#.NET
Excel.Range vRange;
Excel.Application xlApp = Globals.ThisAddIn.Application;
vRange = xlApp.InputBox("Prompt", "Title", Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing,   8);

Subscribe Now!
New videos every Weekend!


Like what I do? Donate
Did I help you? Did one of my tutorials save you sometime? 
You can say thank you by buying me a cup of coffee, I go through a lot of it.
Help keep Greater Good resources free for everyone. Please donate today. 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.