Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Optional Variant


Hi all,

I have looked at help etc, but nothing there i can undestand.

Can i get some info on what is 'Optional Variant" in connection wit
CommandBars?

What does it do?

Pros and cons

--
Desert Piranh

-----------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2893
View this thread: http://www.excelforum.com/showthread.php?threadid=57436

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Optional Variant

Optional means that you don't need to use it.

Variant means that if you do, you'll want to pass a variable that's a variant

You may get a better answer (you won't get one worse!) if you share the line
that you're reviewing.

Desert Piranha wrote:

Hi all,

I have looked at help etc, but nothing there i can undestand.

Can i get some info on what is 'Optional Variant" in connection with
CommandBars?

What does it do?

Pros and cons?

--
Desert Piranha

------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=574363


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Optional Variant


Dave Peterson Wrote:
Optional means that you don't need to use it.

Variant means that if you do, you'll want to pass a variable that's a
variant

You may get a better answer (you won't get one worse!) if you share the
line
that you're reviewing.

Dave PetersonHi Dave,


Thx for your input. I may have found the answer.

I thought that you put the actual value "Optional Variant" into the
code someplace. But at this site
it looks to me like its not inserted in the code but is a name for
doing something.

http://tinyurl.com/pvk7w

Thx again

PS: Dave, i could very well get a worse one. <bg


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=574363

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Optional Variant

By George, I think you've got it!

Desert Piranha wrote:

Dave Peterson Wrote:
Optional means that you don't need to use it.

Variant means that if you do, you'll want to pass a variable that's a
variant

You may get a better answer (you won't get one worse!) if you share the
line
that you're reviewing.

Dave PetersonHi Dave,


Thx for your input. I may have found the answer.

I thought that you put the actual value "Optional Variant" into the
code someplace. But at this site
it looks to me like its not inserted in the code but is a name for
doing something.

http://tinyurl.com/pvk7w

Thx again

PS: Dave, i could very well get a worse one. <bg

--
Desert Piranha

------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=574363


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Optional Variant

At a guess, you are refering the .Add method.
<From Help
Add Method (CommandBars Collection)
Creates a new command bar and adds it to the collection of command bars.
Returns a CommandBar object.
Syntax
expression.Add(Name, Position, MenuBar, Temporary)
expression Required. An expression that returns a CommandBars object.
Name Optional Variant. The name of the new command bar. If this
argument is omitted, a default name is assigned to the command bar (such as
"Custom 1").
...... etc
</From Help

As in the explanation, "Optional" refers to the fact that you do not have
the supply this argument. If you do, then it is used for the Name, if not, a
default is supplied.
As for the "Variant" part, you can basically supply an data type, as long as
it's value can be coerced into a valid value for Name.

NickHK

"Desert Piranha"
<Desert.Piranha.2cyj1w_1156276511.5348@excelforu m-nospam.com wrote in
message news:Desert.Piranha.2cyj1w_1156276511.5348@excelfo rum-nospam.com...

Hi all,

I have looked at help etc, but nothing there i can undestand.

Can i get some info on what is 'Optional Variant" in connection with
CommandBars?

What does it do?

Pros and cons?


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=574363





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Optional Variant


NickHK Wrote:
At a guess, you are refering the .Add method.
<From Help
Add Method (CommandBars Collection)
Creates a new command bar and adds it to the collection of command
bars.
Returns a CommandBar object.
Syntax
expression.Add(Name, Position, MenuBar, Temporary)
expression Required. An expression that returns a CommandBars
object.
Name Optional Variant. The name of the new command bar. If this
argument is omitted, a default name is assigned to the command bar
(such as
"Custom 1").
...... etc
</From Help

As in the explanation, "Optional" refers to the fact that you do not
have
the supply this argument. If you do, then it is used for the Name, if
not, a
default is supplied.
As for the "Variant" part, you can basically supply an data type, as
long as
it's value can be coerced into a valid value for Name.

NickHKHi Nick,


So its nothing i need to be concerned with, as i work with
CommandBars.
I either name them (which i would) or i don't, and don't worry about
it..


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=574363

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
optional calculations roger_the_dodger Excel Worksheet Functions 1 October 6th 08 10:51 PM
Optional hyphen? Eric Excel Discussion (Misc queries) 4 October 19th 06 01:31 AM
Optional Variables Dave Excel Programming 1 June 5th 06 05:25 PM
optional args in UDF masterphilch Excel Programming 4 March 3rd 06 12:23 PM
Optional Linking Vin81 Excel Discussion (Misc queries) 0 February 21st 06 12:56 AM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"