+ Reply to Thread
Results 1 to 3 of 3

ShowModal property

  1. #1
    VJ
    Guest

    ShowModal property

    I have 150 Excel Workbooks which contain form and modules.

    Is there any way to change the showModal property of one of the form in all
    the workbooks through a vba macro.

  2. #2
    Registered User
    Join Date
    02-18-2005
    Posts
    26
    iam not sure of a real way to change the properties all at once, but u can do it make it modeless when u call the form by using userform.show(false)...then again i dunt see the point as its no different from changing the properties..i guess the default values are those in the form properties, changing these values by excecuting a code will only work until the code ends and then the values will revert back to the default values in the properties...hope this helps

    cheers

  3. #3
    Chip Pearson
    Guest

    Re: ShowModal property

    Try something like the following:

    Sub AAA()
    Dim WB As Workbook
    Dim FName As String
    FName = Dir("C:\Temp\*.xls") ' change as required
    Do Until FName = ""
    Set WB = Workbooks.Open(FName)
    WB.VBProject.VBComponents("UserForm1") _
    .Properties("ShowModal").Value = True ' or False
    WB.Save
    WB.Close
    FName = Dir()
    Loop
    End Sub

    Change the directory in the Dir function to your directory, and
    change "UserForm1" to the name of the form.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com




    "VJ" <[email protected]> wrote in message
    news:[email protected]...
    >I have 150 Excel Workbooks which contain form and modules.
    >
    > Is there any way to change the showModal property of one of the
    > form in all
    > the workbooks through a vba macro.




+ 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