Macro in MSExcel

Reply

Join Date: Apr 2007
Posts: 16
Reputation: Ravi Singhal is an unknown quantity at this point 
Solved Threads: 0
Ravi Singhal Ravi Singhal is offline Offline
Newbie Poster

Macro in MSExcel

 
0
  #1
Apr 21st, 2007
Hi, Can somebody help me
I am creating a macro in excel and I want to take input from user.
user can give address of any column,row,cell and may be insert perticuler value.and after that I work on that data and response Excel User.
Thanks in advane
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 59
Reputation: PVBert is an unknown quantity at this point 
Solved Threads: 5
PVBert PVBert is offline Offline
Junior Poster in Training

Re: Macro in MSExcel

 
0
  #2
Apr 21st, 2007
you can make a userform that fullfils your needs.
use:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. UserForm1.Show vbModal
to show the form
put u commandbutton on the form to close the form
put the following code in the commandbutton click event:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Sub Command1.Click
  2. UserForm1.Hide
  3. End Sub
The textbox properties are still readable after this.
Now you can read the values from the forms textboxes:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim sAnswer as String
  2. sAnswer = Userform1.Textbox1.Text
etc.
after that you can unload the form:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Unload UserForm1
The textbox properties are lost after this.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC