Deselect value in inputbox

danbates

Active Member
Joined
Oct 8, 2017
Messages
377
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Is there a way of deselecting the value that is in my input box when it opens?

If so I'd like the prompt to be after the value.

Any help would be appreciated.

Thanks

Dan
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Can you post the code that you are using to show the input box?
 
Upvote 0
Hi Fluff,

Here is my code:

Code:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)

Dim C As Range
Dim Response As String
If Target.Row <= 6 Then Exit Sub
If Target.Column = 1 Then
Application.EnableEvents = False
Response = UCase(InputBox("Please enter the line and batch.", "QA", "9" & Format(Date - DateSerial(Year(Date), 1, 0), "000") & "1092 - "))
ActiveCell.Offset(0, 1).Select
End If
Application.EnableEvents = True
End Sub

Thanks

Dan
 
Upvote 0
With that code, to deselect the value, simply start typing
 
Upvote 0
Hi Fluff,


If I start typing without using the right arrow key, what I type, types over the "92881092 - " that is in the InputBox when loaded.

I missed this line of code from my previous message:
Code:
ActiveCell.Value = Response

Thanks

Dan
 
Upvote 0
Ok, I understand what you are saying & I know of no way to do what you are after.
 
Upvote 0
For anyone searching for an answer to this issue - try then following workaround using SendKeys I have used in past

Rich (BB code):
SendKeys "{END}"
InvoiceNum = InputBox("Input Invoice Number", "Customer Name: " & addme, 55366)



Dave
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,165
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top