In Excel how do I show the contents of just 1 row as a form?
I don't know if this will give you what you're looking for, but give it
a try. Just copy and paste the following code into a module in the
VBE.
Option Explicit
Sub OpenForm()
'By Dave Peterson 10/20/2003
SendKeys "{DOWN " & ActiveCell.Row - 2 & "}{TAB 3}"
Application.DisplayAlerts = False
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True
End Sub
Just click on any record in your Excel database and run this macro. A
form will come up showing you all the fields for just that one record.
A couple of caveats, though:
1.) There is a limit to the number of fields the form will hold. (I
can't remember what it is offhand, but you'll get an error message if
there are too many columns in your database.)
2.) Your field names (in other words, the column headings) must be in
row 1. Otherwise, this code won't work.
Hope this helps. Let me know.
|