+ Reply to Thread
Results 1 to 5 of 5

ShowDataForm method

  1. #1
    nc
    Guest

    ShowDataForm method

    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.

  2. #2
    Debra Dalgleish
    Guest

    Re: ShowDataForm method

    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

    nc wrote:
    > 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.



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


  3. #3
    nc
    Guest

    Re: ShowDataForm method

    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
    >
    >nc wrote:
    >> 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.

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


  4. #4
    Debra Dalgleish
    Guest

    Re: ShowDataForm method

    Does your table start in the range A1:B2?

    If not, you should name the range "Database". There are instructions here:

    http://www.contextures.com/xlNames01.html

    nc wrote:
    > 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
    >>
    >>nc wrote:
    >>
    >>>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.

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

    >



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


  5. #5
    nc
    Guest

    Re: ShowDataForm method

    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.

    >-----Original Message-----
    >Does your table start in the range A1:B2?
    >
    >If not, you should name the range "Database". There are

    instructions here:
    >
    > http://www.contextures.com/xlNames01.html
    >
    >nc wrote:
    >> 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
    >>>
    >>>nc wrote:
    >>>
    >>>>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.
    >>>
    >>>
    >>>--
    >>>Debra Dalgleish
    >>>Excel FAQ, Tips & Book List
    >>>http://www.contextures.com/tiptech.html
    >>>
    >>>.
    >>>

    >>

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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1