function arguments

Dryver14

Well-known Member
Joined
Mar 22, 2010
Messages
2,396
I will probably be here a few times over the next few weeks to get answers to the stuff I am learning.

Function REMOVE(Txt as string) As string

Why 2 As Strings?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
The first specifies the data type of the argument and the second specifies the data type of the return value.
 
Upvote 0
Sorry -- yes, that's correct, and there are times you'd want to use a Variant, but my practice is to always be explicit as to data type.

And unless you need a Variant, it's better practice (faster, smaller memory footprint) to use strongly-typed variables.
 
Upvote 0
No worries, it was kind of a rhetorical question, Thanks for response. I will try and use specific variable types unless of course the answer could be different types of response.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top