Surely Call (like Let, Rem, DefInt, GoSub, GoTo and some others) is the throwback to older versions of BASIC.
In any case to imply that it is incorrect to use this optional keyword is misleading.
Regards
Derek +++
>________________________________
> From: David Smart <smartware.consulting@gmail.com>
>To: ExcelVBA@yahoogroups.com
>Sent: Saturday, 10 March 2012, 6:38
>Subject: Re: [ExcelVBA] Re: [need] pop-up window
>
>
>
>The simple (non-parenthesis) form of a call to a sub (or function) is simply
>a shortcut or throwback in Visual Basic syntax. Your
>
>> MsgBox "Job's done mate.", Button & Icon config, "Text in Title"
>
>should more correctly be
>
>> Call MsgBox("Job's done mate.", Button & Icon config, "Text in Title")
>
>I.e. you are calling the same MsgBox function, with similar parameters to
>the call where you are keeping the return. You are just discarding anything
>it returns.
>
>Regards, Dave S
>
>----- Original Message -----
>From: "Daniel" <daniel@comboprojects.com>
>To: <ExcelVBA@yahoogroups.com>
>Sent: Saturday, March 10, 2012 1:13 PM
>Subject: [ExcelVBA] Re: [need] pop-up window
>
>> Hello Steve.
>>
>> Just read your post and I am not sure if this what you want to know about
>> but I'll give it a go.
>>
>> The MsgBox can be used as a Method (action) or as a function (Question).
>> It is like two different tools having the same name.
>>
>> To use MsgBox as a method simply use it normally by separating each
>> parameter with a comma. Example:
>>
>> MsgBox "Job's done mate.", Button & Icon config, "Text in Title"
>>
>> This is fine if you only need to display a message. To ask a question and
>> save the reply it is a bit different. Example:
>>
>> intAnswer = MsgBox("Are you sure?", Icon & button config, "Text in title")
>>
>> Note the brackets? This means that MsgBox is used as a function and will
>> return a value. This value will be stored in the Integer variable
>> intAnswer.
>>
>> Later you can verify if intValue = vbYes or vbNo or again vbCancel which
>> are variables equal to a number.
>>
>> Again not sure of you were asking a question or making an observation.
>>
>> Daniel
>>
>> --- In ExcelVBA@yahoogroups.com, "noskosteve" <noskosteve@...> wrote:
>>>
>>>
>>> Two things.
>>>
>>> 1 - I don't fully understand something. I also use pop-up Message Boxes
>>> to prompt a user or report errors. Wherever you get the information
>>> *from* to put INTO the MegBox is where you can get it to use elsewhere.
>>> You can also assign a string to a variable and use that variable in the
>>> MsgBox Statement, then use it later.
>>>
>>> 2 - You can also save the information in a (hiddeen) sheet then grab it
>>> for later use. I do much of this as well.
>>>
>>> Regards, Steve N.
>>>
>>>
>>>
>>> --- In ExcelVBA@yahoogroups.com, "David Smart" <smartware.consulting@>
>>> wrote:
>>> >
>>> > You can get VBA to copy information directly to the clipboard. This
>>> > can
>>> > easily be the same information as you then display in the message box.
>>> >
>>> > Do a Google search for: excel vba copy to clipboard
>>> >
>>> > There are lots of examples. This one
>>> > http://www.cpearson.com/excel/Clipboard.aspx seems typical but might be
>>> > clearer than most.
>>> >
>>> > Regards, Dave S
>>> >
>>> > ----- Original Message -----
>>> > From: "wasayraza90" <wasay.raza.qadri@>
>>> > To: <ExcelVBA@yahoogroups.com>
>>> > Sent: Thursday, March 08, 2012 7:39 PM
>>> > Subject: [ExcelVBA] [need] pop-up window
>>> >
>>> >
>>> > >i have made a spread sheet for the calculation of oil compositioon at
>>> > >each
>>> > >separation and have done som more calculations on them.
>>> > > i have made a sub that on double click the msgbox opens and the
>>> > > composition at that pressure is shown in that msg box.
>>> > >
>>> > > problem is that the composition at that msg box cant be copied to be
>>> > > used
>>> > > further on any other sheet.
>>> > >
>>> > > is there any way to copy that composition shown in msgbox or any
>>> > > other
>>> > > popup window through which i can show the values and then copy them
>>> > > to use
>>> > > further
>>> > >
>>> > >
>>> > > thanking you guys in anticipation,
>>> > >
>>> > >
>>> > >
>>> > > ------------------------------------
>>> > >
>>> > > ----------------------------------
>>> > > Be sure to check out TechTrax Ezine for many, free Excel VBA
>>> > > articles! Go
>>> > > here: http://www.mousetrax.com/techtrax to enter the ezine, then
>>> > > search
>>> > > the ARCHIVES for EXCEL VBA.
>>> > >
>>> > > ----------------------------------
>>> > > Visit our ExcelVBA group home page for more info and support files:
>>> > > http://groups.yahoo.com/group/ExcelVBA
>>> > >
>>> > > ----------------------------------
>>> > > More free tutorials and resources available at:
>>> > > http://www.mousetrax.com
>>> > >
>>> > > ----------------------------------Yahoo! Groups Links
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > -----
>>> > > No virus found in this message.
>>> > > Checked by AVG - www.avg.com
>>> > > Version: 10.0.1424 / Virus Database: 2113/4857 - Release Date:
>>> > > 03/07/12
>>> > >
>>> >
>>>
>>
>>
>>
>>
>> ------------------------------------
>>
>> ----------------------------------
>> Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
>> here: http://www.mousetrax.com/techtrax to enter the ezine, then search
>> the ARCHIVES for EXCEL VBA.
>>
>> ----------------------------------
>> Visit our ExcelVBA group home page for more info and support files:
>> http://groups.yahoo.com/group/ExcelVBA
>>
>> ----------------------------------
>> More free tutorials and resources available at:
>> http://www.mousetrax.com
>>
>> ----------------------------------Yahoo! Groups Links
>>
>>
>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1424 / Virus Database: 2113/4860 - Release Date: 03/09/12
>>
>
>
>
>
>
[Non-text portions of this message have been removed]
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar