Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

I need a macro which will have a box poped up with 5 to 10 entry boxes

Posted on 2007-07-27
14
Medium Priority
?
275 Views
Last Modified: 2010-05-18

Hi,

I need a macro which will have a box poped up with 5 to 10 entry boxes and i can type 10 data's in it and the data found should be copied to a new sheet with the full row.

Regards
Sharath
0
Comment
Question by:bsharath
  • 7
  • 4
  • 2
  • +1
14 Comments
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19583813
i dont think 5 to 10 entry boxes are possible, a single Inputbox with your data separated by some delimiter like comma can be used. Should i provide you with such a macro?
0
 
LVL 11

Author Comment

by:bsharath
ID: 19583854
Yes please..
0
 
LVL 19

Expert Comment

by:William Elliott
ID: 19583864
as stated above this is not possible, unless you make your own forms
there si 4 text boxes for you
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1").Select
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.2").Select
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.3").Select
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.4").Select
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.5").Select


you can have a series of inputboxes

strtext = inputbox(What you are askinf", "Title", "default text")
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19583881
Sub search values()

Dim str1, str2() as String
str1 = InputBox("SearchValues) ' Enter strings separated  by , e.g Sharath,Ramesh,
str2=Split(str1,",")

Dim valuefound as Boolean,s2row as Integer
s2row=1

For i=1 to Sheet1.Usedrange.Rows.Count
   valuefound = False
   For j=1 to Sheet1.Usedrange.Columns.Count
      For k=1 to Ubound(str2)
          if UCase(Sheet1.Cells(i,j)) = UCase(str1) then
               valuefound = True
               Exit For
           End if
       Next
       
  Next
   if valuefound = True then
        Sheet1.Rows(i).Copy Destination:= Sheet2.Rows(s2row)
        s2row = s2row + 1
  End if
Next

End Sub
0
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19584006
and sharath can you please upload the file in which pivottables were used in your previous questions, to filepatio.com, because i cant download from ee-stuff and i wanted to have a look at that solution
0
 
LVL 58

Expert Comment

by:harfang
ID: 19585459
> i cant download from ee-stuff

Why can't you? It's basically using your EE account for validation.
(°v°)
0
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19585516
because i get error host not accessible
0
 
LVL 58

Expert Comment

by:harfang
ID: 19586113
try to go directly to http:/www.ee-stuff.com and login from the main page. Then use "search files for question" to locate the file. The direct link may be broken.
(°v°)
0
 
LVL 11

Author Comment

by:bsharath
ID: 19590319
I get a compiling error....
0
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19590355
Sub search values()

Dim str1, str2() as String
str1 = InputBox("SearchValues") ' Enter strings separated  by , e.g Sharath,Ramesh,
str2=Split(str1,",")

Dim valuefound as Boolean,s2row as Integer
s2row=1

For i=1 to Sheet1.Usedrange.Rows.Count
   valuefound = False
   For j=1 to Sheet1.Usedrange.Columns.Count
      For k=1 to Ubound(str2)
          if UCase(Sheet1.Cells(i,j)) = UCase(str1) then
               valuefound = True
               Exit For
           End if
       Next
       
  Next
   if valuefound = True then
        Sheet1.Rows(i).Copy Destination:= Sheet2.Rows(s2row)
        s2row = s2row + 1
  End if
Next

End Sub
0
 
LVL 11

Author Comment

by:bsharath
ID: 19590440
I put Sharath,ramesh in the search box.
There are these 2 names in the file
But no errors nor results.
0
 
LVL 13

Accepted Solution

by:
hiteshgoldeneye earned 2000 total points
ID: 19590711
'here you go
Dim str1, str2() as String
str1 = InputBox("SearchValues") ' Enter strings separated  by , e.g Sharath,Ramesh,
str2=Split(str1,",")

Dim valuefound as Boolean,s2row as Integer
s2row=1

For i=1 to Sheet1.Usedrange.Rows.Count
   valuefound = False
   For j=1 to Sheet1.Usedrange.Columns.Count
      For k=1 to Ubound(str2)
          if UCase(Sheet1.Cells(i,j)) = UCase(str2(k-1)) then
               valuefound = True
               Exit For
           End if
       Next
       
  Next
   if valuefound = True then
        Sheet1.Rows(i).Copy Destination:= Sheet2.Rows(s2row)
        s2row = s2row + 1
  End if
Next

End Sub

0
 
LVL 11

Author Comment

by:bsharath
ID: 19590735
Still not coping...
0
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19590755
Dont put Sharath,ramesh in the search box
put Sharath,ramesh,
and then see
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question