+ Reply to Thread
Results 1 to 5 of 5

Display a form but not the spreadsheet

  1. #1
    Registered User
    Join Date
    08-12-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    17

    Display a form but not the spreadsheet

    Hi,

    I am trying to devise code that when I open a spreadsheet it wont be visible however an entry form will be displayed. I have tried the code below, however it either doesn't display the form or makes the form visible and the spreadhseet visible.

    Private Sub Workbook_Open()

    Trade.Show

    Windows("Trade Register.xls").Visible = False

    End Sub

    Essentially what I want to do is to have a form display when I open the spreasheet to allow the user to input the data, without seeing the excel workbook - just the form. Any help would be greatly appreciated.

    Thanks,

    Ewan

  2. #2
    Registered User
    Join Date
    08-12-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Display a form but not the spreadsheet

    Hi,

    I am trying to devise code that when I open a spreadsheet it wont be visible however an entry form will be displayed. I have tried the code below, however it either doesn't display the form or makes the form visible and the spreadhseet visible.

    Please Login or Register  to view this content.
    Essentially what I want to do is to have a form display when I open the spreasheet to allow the user to input the data, without seeing the excel workbook - just the form. Any help would be greatly appreciated.

    Thanks,

    Ewan
    Last edited by romperstomper; 12-06-2011 at 09:33 AM. Reason: correct tags

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: Display a form but not the spreadsheet

    Hi,
    You need to hide the workbook before you open the form (since your code will stop at that point, unless the form is modeless).

    Note also that I corrected your tags from Quote tags to Code tags.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Display a form but not the spreadsheet

    You can hide the Excel application, but I wouldn't recommend it unless you can cope with any problems that might occur
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Display a form but not the spreadsheet

    method 1
    Please Login or Register  to view this content.
    method 2
    Please Login or Register  to view this content.
    method 3
    Please Login or Register  to view this content.
    method 4
    Please Login or Register  to view this content.



+ 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