LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default InputBox

How do you move the InputBox to the Top Right of the screen?

Sub testme99()

Dim myColA As Range
Dim myColB As Range
Dim myCell As Range
Dim myMaster As Range
Dim mySub As Range
Dim res As Variant

On Error Resume Next
Set myColA = Application.InputBox("select first Range", _ **
Top:= ? Left:= ? **
Default:=Selection.Address, Title:="Select", Type:=8)
On Error GoTo 0

If myColA Is Nothing Then Exit Sub

On Error Resume Next
Set myColB = Application.InputBox("select 2nd range", Type:=8) ** Top:=
? Left:= ? **

On Error GoTo 0

If myColB Is Nothing Then Exit Sub

If myColA.Cells.Count myColB.Cells.Count Then
Set myMaster = myColB
Set mySub = myColA
Else
Set myMaster = myColA
Set mySub = myColB
End If

'loop through smaller range
For Each myCell In myMaster.Cells
res = Application.Match(myCell.Value, mySub, 0)
If IsError(res) Then
'no match
Else
myCell.Interior.ColorIndex = 6
mySub(res).Interior.ColorIndex = 6
End If
Next myCell

End Sub

With Thanks


 
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
InputBox Help Mark[_8_] Excel Discussion (Misc queries) 2 November 24th 08 11:07 PM
InputBox with VBA Mark[_8_] Excel Discussion (Misc queries) 0 November 24th 08 12:39 AM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
Inputbox sadik Excel Programming 3 February 19th 04 07:14 PM
inputbox Lawson Excel Programming 2 October 7th 03 08:58 PM


All times are GMT +1. The time now is 07:08 PM.

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"