ShowDataForm method

  • Thread starter Thread starter nc
  • Start date Start date
N

nc

I recorded the following macro

Range("A1:B1").Select
ActiveSheet.ShowDataForm

It works on a new unsaved workbook, but I get the error
message "ShowDataForm method of worksheet class failed"
when I run it on a template. Please help.

Thanks.
 
The table should start in the range A1:B2, or it should be named
"Database".

XL2000: ShowDataForm Method Fails if Data Cannot Be Found
http://support.microsoft.com/default.aspx?id=213835

Also, if you're using Excel 97, the error may be caused by the command
button taking the focus. Set the command button's TakeFocusOnClick to
False, or add the following line at the beginning of the code:

ActiveCell.Select
 
Debra

I am using Excel 2003.

Thanks

-----Original Message-----
The table should start in the range A1:B2, or it should be named
"Database".

XL2000: ShowDataForm Method Fails if Data Cannot Be Found
http://support.microsoft.com/default.aspx?id=213835

Also, if you're using Excel 97, the error may be caused by the command
button taking the focus. Set the command button's TakeFocusOnClick to
False, or add the following line at the beginning of the code:

ActiveCell.Select



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

.
 
Debra

What baffling me is that it works in a workbook created
on Excel 2003 without using a named range, but not on one
that was first created on Excel 2000 then saved on 2003.
Could that be the problem?

Thanks.
 

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

Similar Threads


Back
Top