Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

VBA Explanation of syntax Update.Show

Hi again,

I asked a similar question before and realised that I still don't understand!

Here goes;

Sub Start_Click()
Update.DTTo.Value = Date - 1
Update.DTFrom.Value = Date - 1
Update.DTFrom.Day = 1
Update.Show

End Sub


Specifically, what does "UPDATE.SHOW" mean?
0
Patrick O'Dea
Asked:
Patrick O'Dea
  • 3
2 Solutions
 
Angelp1ayCommented:
I believe it displays the form named "Update" to the user.
0
 
Angelp1ayCommented:
See the section "Displaying a Userform" at this link:
http://www.excel-spreadsheet.com/vba/userforms.htm

Displaying a Userform

Once the userform has been created, the next stage is to test to see how the user form will look. You can use the Run (F5 function key in design time mode) command when the active form is displayed.  But, writing code is ultimately how a user form will be used.

Decide where the code is to be stored (in a Module, Worksheet or Workbook).

Use the name of the form with the Show method command.

Example:
Sub DisplayMyUserform()
    MyUserForm.Show
End Sub


The user form is known, as ‘MyUserForm’ and the Show method will display the user form.

There is one optional argument called Modal which can be explicitly defined and has a value of 0  or 1 .
 
1 = a modal state which means that users have to complete the form and can not click anywhere else (in the background).
 
0 = a modeless state which allows users to click outside the form area.
 
The default is 1  if omitted.
 
MyUserForm.Show 0
MyUserForm.Show 1 or MyUserForm.Show
0
 
Patrick O'DeaAuthor Commented:
Ah ! got it now!

The confusion arose because the author of the sheet called the form "Update"...

I had assumed that the "Update" was some served word in VBA etc.
0
 
Angelp1ayCommented:
So did I at first look! It's the previous lines that give it away.
Glad to help :) Have a great day!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now