On May 25, 1:01*pm, "Jim Cone" wrote:
It is a strange animal. *Name the range you are working on "Database"....
Sub createsearchuserform()
* * Sheets("ProjectList").Columns("A:D").Name = "Database"
* * Sheets("ProjectList").Select
* * Sheets("ProjectList").ShowDataForm
End Sub
'Note: no spaces in the sub name.
'And you don't have to select the sheet - depends on how strange you want to make it..
--
Jim Cone
Portland, Oregon *USA
(http://tinyurl.com/ExtrasForXL)
"BJ&theBear"
wrote in ...
This very short macro below creates a userform which can be searched
to find the required contract number.
However when it is "run" an error message appears that "Excel cannot
determine which row contains column labels *then it gives you
options:-
*if headings are 1st row press OK - "this is the case"
or if you selected a subset of cells in error, select a single cell
and try again
or create column text labels (already done)
or for info on labels select help
Any help on removing this error message - there are just four columns
and all are labelled in *the first row with text labels
Sub create searchuserform()
' Macro
' Macro recorded 19/05/2010 by Brian
* * Sheets("ProjectList").Select
* * Columns("A:D").Select
* * ActiveSheet.ShowDataForm
End Sub
Any help would be appreciated
Thanks
Brian
Scotland
Thanks Jim - worked a treat
BJ