Inputbox Verbiage

R

Ron

I have an Inputbox that scans a range of rows in a column and asks for
corrections to cells that do not meet the required cell content. Once
a cell is found that does not meet the requirements the user has the
opportunity to input the correct data via an Inputbox. On the
Inputbox the verbiage is “Please enter a 6 digit value”. Is there a
way to include the cell address and column header? Something like
“Please enter a 6 digit value in the Accounts column cell N25” or
something similar. As always, thank you guys you’re the best. Ron
 
J

JLGWhiz

You can assign a variable to the cell based on the same criteria that finds
it. You did not specify the method that you are using to locate the errant
cell, but if you were using Find, the whatever you set as the find object
variable can also be used to identify both the cell address and the column
header. Here is and example:

Set c = Cells.Find("Flub", LookIn:=xlValues)
If Not c Is Nothing Then
c.Value = InputBox("Enter correct data for cell " _
& c.Address & " for column Header " & +
Cells(1, c.Column))
End If

The above is for illustration only, It would probably need some
qualification for
the Cells reference to avoid runtime errors. But maybe it will give you an
idea.
 
D

dk

I have an Inputbox that scans a range of rows in a column and asks for
corrections to cells that do not meet the required cell content.  Once
a cell is found that does not meet the requirements the user has the
opportunity to input the correct data via an Inputbox.  On the
Inputbox the verbiage is “Please enter a 6 digit value”.  Is there a
way to include the cell address and column header?   Something like
“Please enter a 6 digit value in the Accounts column cell N25” or
something similar.  As always, thank you guys you’re the best.  Ron

try this:

"Please enter a 6 digit value in the Accounts column " &
ActiveCell.Address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top