944,035 Members | Top Members by Rank

Ad:
Apr 21st, 2007
0

Macro in MSExcel

Expand Post »
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
Similar Threads
Reputation Points: 12
Solved Threads: 0
Newbie Poster
Ravi Singhal is offline Offline
16 posts
since Apr 2007
Apr 21st, 2007
0

Re: Macro in MSExcel

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.
Reputation Points: 10
Solved Threads: 5
Junior Poster in Training
PVBert is offline Offline
60 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: sendmessage to a password box?
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Image.picture - need some help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC