Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA Explanation of syntax Update.Show

Posted on 2014-01-19
4
Medium Priority
?
239 Views
Last Modified: 2014-01-19
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
Comment
Question by:Patrick O'Dea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 11

Accepted Solution

by:
Angelp1ay earned 2000 total points
ID: 39791901
I believe it displays the form named "Update" to the user.
0
 
LVL 11

Assisted Solution

by:Angelp1ay
Angelp1ay earned 2000 total points
ID: 39791902
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
 

Author Closing Comment

by:Patrick O'Dea
ID: 39792114
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
 
LVL 11

Expert Comment

by:Angelp1ay
ID: 39792134
So did I at first look! It's the previous lines that give it away.
Glad to help :) Have a great day!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question