InputBox with C#

Joined
Jul 1, 2005
Messages
1
Reaction score
0
I'm trying to get user selected range info from an excel file.

The following VB code serves for that purpose

Application.InputBox("Select cells", Type:=8)

Could anyone tell me how I should write the code in C#?
 
Joined
Jan 9, 2008
Messages
1
Reaction score
0
input box in c#

hi friend!!!!!!!
Following codes for input box in c#

step 1: Add refernce Microsoft.VisualBasic
step 2:
privatevoid button1_Click(object sender, EventArgs e)

{

string result = Microsoft.VisualBasic.Interaction.InputBox("kkk","text", "", 10, 20);

MessageBox.Show(result);

}
step3: run program
step 4:enter input no or text and press ok.



Enjoy this code!!!!
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top