Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Can this be done "Open Input Box"

Hello Jacob

Excellent and I thankyou

Steved

"Jacob Skaria" wrote:

I am not sure whether I understood your query correctly...Try the below

--You are trying to search a string eg: 007,7.25 which exists in ColC and
ColD. (007 in ColC and 7.25 in Col D)

--Try the below macro which will prompt for a input and if you type 007,7.25
it will look for 007 in ColC and also which has got an entry 7.25 in ColD

--I have tried the below in a new workbook. Formatted the columns C and D as
text and entered 007, 7.25 in C10, D10 and C20,D20....The macro will search
and returns the address and prompts whether to continue. If the user selects
no; the the macro will end...

Sub Macro()

Dim varFound As Variant
Dim varSearch As Variant
Dim arrSearch As Variant
Dim strSearch As String

strSearch = InputBox("Type the string to be searched in Col C and D")
arrSearch = Split(strSearch & ",,", ",")

varSearch = arrSearch(0)

With Worksheets("Sheet1").Range("C:C")
Set varFound = .Find(varSearch, LookIn:=xlValues)
If Not varFound Is Nothing Then
firstAddress = varFound.Address
Do
If varFound.Offset(0, 1) = arrSearch(1) Then
varFound.Activate
If MsgBox(strSearch & " found at " & varFound.Address & _
vbLf & "Do you want to continue ?", vbYesNo) = vbNo Then Exit Sub
End If
Set varFound = .FindNext(varFound)
Loop While Not varFound Is Nothing And _
varFound.Address < firstAddress
End If
End With

End Sub



If this post helps click Yes
---------------
Jacob Skaria


"Steved" wrote:

Hello Jacob

I thankyou, however please I require your help

The below brings up the input box I type in 007,7.25 the input box closes,
after I hit ok.

I'm not a VBA person but I got the below to go so far, and I would like
please to stop at the found Cells and if that is the only one found go left 2
cells if their is more than one occurrence please invite me to cancel or go
and find the next ie "007,7.25" may be there more than once.

I Thankyou for your time on my issue.

Steved

Sub Schools()
Dim Firstcell As Range
Dim NextCell As Range
Dim vaRecipient As Variant
vaRecipient = Application.InputBox(Prompt:="Please enter the number", _
Title:="Recipient", Type:=2, Left:=ActiveCell.Left, Top:=ActiveCell.Top)

End Sub




"Jacob Skaria" wrote:

Do you mean...

vaRecipient = Application.InputBox(Prompt:="Please enter the number", _
Title:="Recipient", Type:=2, Left:=ActiveCell.Left, Top:=ActiveCell.Top)

If this post helps click Yes
---------------
Jacob Skaria


"Steved" wrote:

Hello from Steved

Is the below possible please if so How would I go about it.

I Have a "input box", no matter where I'm on the worksheet I would like it
to open so the I can type ie 007,7.25 or something similar

I have this input box at the Beginning off the worksheet, and I find if I'm
on row 580 and I would like to open a input box on row 580.

I Thankyou.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
How to disable "New" "open" menu items in Excel 2007 Aruna Akella Excel Programming 1 March 26th 08 05:13 AM
Detecting user cancel out of "File Open" input box [email protected] Excel Programming 3 September 25th 07 02:55 PM
Change default in input box from "20" to "000000"? Have macro continue on to name sheet tab? StargateFanFromWork[_4_] Excel Programming 7 October 29th 06 11:46 AM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"