Form fill in

R

Ron

I believe I've seen Excel fill in forms that has the instruction of what to
put in a cell written in the cell in maybe a shadowed-type print. Then as
one uses the form and begins to enter information in that particular cell the
instruction disappears and the newly typed information replaces it. What is
that called in Excel and how is it done?
 
G

Gord Dibben

I have not seen this type of form that you speak of.

Any time you start typing in a cell you will overwrite what was in the cell
to begin with.

You could place instructional text in a cell and format the text to a light
gray color.

Then using this event code the formatting would be cleared when you typed
new text into the cell(s).

Private Sub Worksheet_Change(ByVal Target As Range)
Const sINPUTS As String = "A1,B2,C3,D4,E5,F6" 'edit cells to suit
On Error GoTo ws_exit:
If Me.Range(sINPUTS) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Font.ColorIndex = 0
ws_exit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste the code into that
module.

An alternative to all the above could be a Data Validation Input Message.

When user clicks on the cell a message pops up with instructions.


Gord Dibben MS Excel MVP
 
S

Shane Devenshire

Hi,

That behavior exists in design are of PivotTables but not for quite the
purpose you are refering to. Direction appear that say Drop Row Fields Here
and when you drop a field in that area the message disappears.

But there is no such feature available to the Excel user for this purpose.
However, you could enter instructions in cells and when the user typed on
those cells the instructions would be replaced. But then, that is just
Excel's default behavior.

If this helps, please click the Yes button.

Cheers,
Shane Devenshire
 
Top