win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key cheap Win 7 key win 7 professional Windows 7 key windows-7-ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key store Windows 7 Professional Product Key Windows-7-Ultimate-Product-Key windows-7-home-premium buy Windows 7 key Office-2013-key office-professional-plus-2013 Office-2010-key Office-2016-key windows 8 key windows-8-key-sale windows 8.1 key windows 8.1 product key windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key win 7 key Win 7 key product key Win 7 ultimate key Win 7 key sale Windows 7 professional windows 7 Pro key Windows 7 key windows 7 ultimate Windows 7 ultimate key Windows 7 product key Windows 7 key sale Windows 7 iso windows 7 home premium windows 7 home Office 2013 key Office 2013 Professional Office 2010 key office 2010 product key Office 2016 key office 2016 product key office 2016 pro key windows 8 key windows 8 key sale Windows 8 pro windows 8.1 key windows 8.1 product key windows 8.1 professional windows 10 key windows 10 product key Windows 10 product key Windows 10 Pro Product Key windows 7 home Windows 7 professional windows 7 pro windows 7 key Windows 7 professional windows 10 product key windows 10 key windows 8 key Windows 8.1 professional windows 8.1 pro office 2013 key office-2010 serial key office 2010 key windows 10 key windows 7 home premium windows 7 ultimate windows 8.1 key windows 8 professional windows 7 ultimate windows 7 key windows 7 home windows 7 activation key win 10 professional office 2010 key Windows 7 Product Key Windows 7 Key Windows 7 iso Windows 7 ultimate

How Much You Should Be Making… as a Developer (Updated for 2016)

A few years ago I was working for a small Broker-Agent in midtown Manhattan making what I thought was a lot of money at the time.  I was making 55$ pe...

Read More »

How to Calculate a SHA Checksum on all Files in a Directory

It took me some time to figure this one out, so I figured I would share this with everybody on the internet.  I had a directory with a bunch of tgz fi...

Read More »

GlassDoor.com and Emolument.com – Use these sites!

I have always been a follower of salary guides, salary statistics...etc  In fact, had it not been for me getting my hands on the Robert Half Technolog...

Read More »

Adding Boost to your Autotools Project

Do you want to take your existing autotools project and to add support for the Boost libraries?  I want to specifically use Boost Threading, so I have...

Read More »

A Very Basic Autotools Project

So recently I wanted to learn enough about Autotools so that I could convert a C++ project which I was working on into an Autotools project.  After se...

Read More »

Reflection with Java-style Annotations in C++ on Linux (Part 2 of 3)

Part 2 - Linux (Fedora Core 20 32-bit and 64-bit) For part 2 of this article, I tested out the instructions using a Fedora Core 20 installation on a v...

Read More »

Reflection with Java-style Annotations in C++ on Windows using Cygwin (Part 1 of 3)

Motivation I wanted to have reflection with Java-style Annotations in my C++ Applications.  I didn't want to use C++11 or anything fancy like that and...

Read More »

Creating a VBA Variant with type “Missing”

How do you test an Excel VBA function that takes lots of optional parameters without making a lot of calls to the same function? Instead of: [vb] If N...

Read More »

How Much You Should Be Making… as a Developer (Updated for 2016)

A few years ago I was working for a small Broker-Agent in midtown Manhattan making what I thought was a lot of money at the time.  I was making 55$ per hour on a W2 basis.  At first I was like “wow!” over 50$ per hour! I don’t believe it!  Of course that didn’t come with any benefits such as sick days, paid vacation, 401k…etc.  Then one day I came across the 2007 version of the Robert Half Technology Salary Guide and instantly realized that I was being underpaid.  Not just underpaid, very underpaid.  Not to mention the fact that I was a very productive developer, this Broker-Agent was really getting a good bang for its buck.

So, make a visit to the following link on the Robert Half Technology Website and click on the link titled “2016 IT Salary Guide”.

http://www.roberthalf.com/technology/it-salary-center

 

In order to save you some time, I have crunched some of the numbers for various roles and adjusted them for C#/Java Developers working in the New York City Metropolitan area:

National Range Add 9% for C# or Java Add 40% for New York City
Title 25th Percentile 75th Percentile 25th Percentile 75th Percentile 25th Percentile 75th Percentile Average
Applications Development /Manager $105,750 $160,500 $115,267 $174,945 $161,374 $244,923 $203,148
Project Manager $95,250 $146,500 $103,822 $159,685 $145,351 $223,559 $184,455
Applications Architect $121,250 $171,750 $132,162 $187,207 $185,027 $262,090 $223,559
Mobile Applications Developer $115,250 $175,750 $125,622 $191,567 $175,871 $268,194 $222,033
Software Engineer $103,000 $156,250 $112,270 $170,312 $157,178 $238,437 $197,807
Software Developer $91,000 $145,250 $99,190 $158,322 $138,866 $221,651 $180,258

Here is the raw data.  For each role the 25th percentile and 75th percentile base salaries for entering an organization are listed.

Applications Development Manager – 105,750 – 160,500
Project Manager – 95,250 – 146,500
Applications Architect – 121,250 – 171,750
Mobile Applications Developer – 115,250 – 175,750
Software Engineer – 103,000 – 156,250
Software Developer – 91,000 – 145,250

If your role is primarily a Java role, add 9%, if your role is primary a C# role, add 8%.  Finally, the adjustment for the New York City Metropolitan area is 40%, so multiple the final salary by 1.40 to get to the numbers listed above.

C# – add 8%
Java – add 9%
NYC 1.40

A few years ago I was working for a small Broker-Agent in midtown Manhattan making what I thought was a lot of money at...

Read More »

How to Calculate a SHA Checksum on all Files in a Directory

Slider-Hash

It took me some time to figure this one out, so I figured I would share this with everybody on the internet.  I had a directory with a bunch of tgz files and I wanted to make a checksum on every single file without having to write a script, I always knew that the find command had an “exec” option, but I had problems with the redirection.  After some trial-and-error, here is the command I used, it worked out perfectly!

find . -name “*.tgz” -exec sha256sum {} > checksums.sha256 \;

The results were a simple file that I could use to verify that I did indeed download the files off of my server without any corruption.

It took me some time to figure this one out, so I figured I would share this with everybody on the internet.  I had a di...

Read More »

GlassDoor.com and Emolument.com – Use these sites!

Slider-Emolument

I have always been a follower of salary guides, salary statistics…etc  In fact, had it not been for me getting my hands on the Robert Half Technology Salary guide from… 2007, I would probably be making a lot less money at my current job.  Knowledge is empowerment.

That is why I recommend that you visit the following salary sites and to enter your information, the more information and statistics that we have, the better salaries we will get when searching for a new job:

And finally, after you enter your salary/rate information, these sites will allow you to browse their information for free!

I have always been a follower of salary guides, salary statistics...etc  In fact, had it not been for me getting my hand...

Read More »

Adding Boost to your Autotools Project

Slider-Boost-Autotools

Do you want to take your existing autotools project and to add support for the Boost libraries?  I want to specifically use Boost Threading, so I have included everything that I did to make my project as well as the full source code included at the bottom of this article.

If you want to read a nice guide on how to use threading in Boost visit this link:

 http://antonym.org/2009/05/threading-with-boost—part-i-creating-threads.html

Step 1 – Download Boost M4 Macros

Modify your configure.ac file to use some Boost macros.  In order for autotools to find these macros you will have to download them from the GNU autoconf archive.  For Boost Threading support you will need to download:

Place those files into the m4 sub-directory of your project.

Step 2 – Reference M4 Macros Directory

Your configure.ac should now reference the m4 macros directory by adding the AC_CONFIG_MACRO_DIR macro call like so:

[shell]
AC_CONFIG_MACRO_DIR([m4])
[/shell]

Your Makefile.am file should also have a call to another macro to enable these changes as well:

[shell]
ACLOCAL_AMFLAGS = -I m4
[/shell]

Step 3 – Call the Boost Macros from your configure.ac file

Now we have to make another change to your configure.ac file, we need to call the actual Boost Macros provided by the m4 files which you added to your project before. Make sure you add these calls after the call to the AC_CONFIG_MACRO_DIR (obviously):

[shell]
AX_BOOST_BASE([1.53],,[AC_MSG_ERROR([projectX needs Boost, but it was not found in your system])])

AX_BOOST_SYSTEM
AX_BOOST_THREAD
[/shell]

Step 4 – Modify your Makefile.am file to add the bootstrap directory

Add a reference to a variable named EXTRA_DIST so that your project will find the necessary Boost files when building.

[shell]
EXTRA_DIST = bootstrap
[/shell]

Step 5 – Modify your src/Makefile.am to add some link parameters to allow your linker to properly find the Boost libraries.

Modify your src/Makefile.am file to include some parameters to cause it to link to the proper boost libraries as well:

[shell]
AM_CPPFLAGS = $(BOOST_CPPFLAGS)
AM_LDFLAGS = $(BOOST_LDFLAGS)

<app_name>_LDADD = \
$(BOOST_THREAD_LIB)
[/shell]

Step 6 – Recreate your config files by running the same steps as you normally do and rebuild your code, now with Boost Threading support!

[shell]
autoreconf -fvi
./configure
make
[/shell]

You can download the associated source code here:

myBoostProject

Note to cygwin users:

If you want to download the boost libraries, you will have to use a mirror that has the boost-devel package.  You can use the truefunny.com mirror here: http://truefunny.com/cygwin while running the cygwin installer.  If you are using apt-cyg, run the following command:

[shell]
apt-cyg -m http://truefunny.com/cygwin install boost-devel
[/shell]

Do you want to take your existing autotools project and to add support for the Boost libraries?  I want to specifically...

Read More »

A Very Basic Autotools Project

Slider-Basic-Autotools

So recently I wanted to learn enough about Autotools so that I could convert a C++ project which I was working on into an Autotools project.  After searching and searching the internet, I finally came across enough information to make a basic, very vanilla project.

After creating that basic project I decided that I also wanted to add support for the Boost libraries.  So I figured that I would post the files for the basic project first here and then I would modify it to support boost and to post that project here as well.

The important Files

I had a hard time figuring this out, but an autotools project consists of a lot of files.  Most of these files are autogenerated and are not really necessary for you to know what they do, especially if all you want to do is create a simple project…etc.  So you really only need to worry about the following files:

  • configure.ac
  • Makefile.am
  • src/Makefile.am
  • your source files – put them under the src and include directories

What a very simple project looks like

  • configure.ac
  • Makefile.am
  • src/Makefile.am
  • src/main.cpp
  • include/my_include.h

How it works

So, how does autotools work? Well, if you go to the documentation on its homepage, you will have to read the entire documentation for autoconf, automake, aclocal, m4, libtool and a bunch of other components of autotools and only then will you know how it works.  Or, you can read my explanation here:

  1. Create configure.ac file
  2. Create Makefile.ac file
  3. Copy source files in
  4. Run “autoreconf -fvi”

Now your project is ready for use via the normal commands that you are used to using such as “./configure” and “make”… Let us start with creating our own project that contains one source file – “main.cpp” and one include file “my_include.h”

Project Format

[shell toolbar=”true”]
./myProject/configure.ac
./myProject/Makefile.ac
./myProject/src/main.cpp
./myProject/src/my_include.h
[/shell]

configure.ac

[shell]
dnl Comments are lines that begin with the letters "dnl"
dnl Comments that begin with # are also an option, and those
dnl comments will appear in the resulting configure script

dnl Specify required version of autoconf
AC_PREREQ([2.6])

dnl Set some parameters for our project
dnl Project Name – Version – Contact Email Address
AC_INIT([myProject], [1.0.0], [johnstratoudakis@gmail.com])

dnl Specify that we are using C++
AC_PROG_CXX

dnl Detect host operating system
dnl If we don’t want to support an operating system
dnl we use "AC_MSG_ERROR" to cause our configure script
dnl to stop executing
AC_CANONICAL_HOST
case $host_os in
darwin* )
echo "OS X Platform"
;;
linux* )
echo "Linux Platform"
;;
cygwin*)
echo "Cygwin Platform"
;;
*)
echo "Unknown Platform"
AC_MSG_ERROR([Your platform is not supported])
;;
esac

dnl Set some parameters for automake
dnl Note: These parameters are for automake, not make
dnl and the foreign parameter means that it is not using
dnl the standard autotools project format which includes
dnl several extra files and directories (files like README
dnl COPYING and similar)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

dnl Tells autoconf which Makefiles need to be generated and
dnl it will search for files named Makefile.am in these locations
AC_CONFIG_FILES(Makefile src/Makefile)

dnl Tells autoconf to start creating the output. To be more specific
dnl it tells autoconf to generate and run config.status.
AC_OUTPUT
[/shell]

All you need to know is that the Makefile and src/Makefile files will be used for building your project. That means if you create a sub-directory in your source code, add that Makefile reference into this file. Now on to the actual Makefile.am files themselves

Makefile.am and src/Makefile.am

Your project needs to contain a Makefile.am at the root of each directory containing source files.  Now this is known as “recursive make”, which is bad.  I am not going to get into the reasons why at this time, but I will try to find an example which does not use recursive make in the future.

The Makefile.am file in the project root directory is simple, it only contains one line which is used to reference the Makefile in the src sub-directory:

[shell]
# SUBDIRS specifies that automake should continue searching for
# more Makefile.am files in the directories listed below
SUBDIRS = src
[/shell]

The Makefile.am file in the src directory is a little longer

[shell]
# bin_PROGRAMS specifies the name of an output binary
# which is to be created
bin_PROGRAMS = myProject

# _SOURCES specifies the required source files
myProject_SOURCES = main.cpp

# CPPFLAGS are parameters that will be passed to the
# compiler, in this case the inclusion of the include
# directory
myProject_CPPFLAGS = -I$(top_srcdir)/include
[/shell]

Now all you need to do to build your project is to execute the following:

[shell]
autoreconf -fvi
./configure
make
[/shell]

And that’s it! Download the source here:

myProject.tgz

So recently I wanted to learn enough about Autotools so that I could convert a C++ project which I was working on into a...

Read More »

Reflection with Java-style Annotations in C++ on Linux (Part 2 of 3)

Slider-Reflection-Linux

Part 2 – Linux (Fedora Core 20 32-bit and 64-bit)

For part 2 of this article, I tested out the instructions using a Fedora Core 20 installation on a virtual machine created with Oracle VirtulBox and the Fedora Core 20 (32-bit, and 64-bit) Live DVDs.

  • Fedora-Live-Desktop-i686-20-1.iso
  • Fedora-Live-Desktop-x86_64-20-1.iso

These instructions should work on most, if not all distributions of linux, if you run into any problems, please post them as comments or message me directly and I will be more than happy to assist you.

For different platforms, see the other parts of this series:

Step 1

Enable Port Forwarding on your Virtual Machine

I like to access my virtual Machine via Putty, so I set the following Port Forwarding Rules:

( Settings -> Network -> Adapter 1 -> Advanced -> Port Forwarding )

Protocol – Host IP – Host Port – Guest IP – Guest Port

TCP – 127.0.0.1 – 2222 – 10.0.2.15 – 22

(and make sure you unmount the Fedora Live Disk before restarting your virtual machine!)

Step 2

Enable SSH Daemon on your Virtual Machine

Turn your virtual machine back on and login interactively and enabled SSHD via:

[shell]
sudo chkconfig sshd on
sudo service sshd start
[/shell]

Step 3

Enable Sudo without password.

Start Putty and ssh in from your locahost and edit the “sudo users” file by issuing the command:

[shell]
sudo visudo
[/shell]

Then in the subsequent editor, uncomment the line that says:

[shell]#%wheel  ALL=(ALL)       NOPASSWD: ALL[/shell]

becomes:

[shell]%wheel  ALL=(ALL)       NOPASSWD: ALL[/shell]

Step 4

Update all Packages (may take a few minutes)

From your putty session, issue the following command to update all packages:

[shell]sudo yum update[/shell]

Note: If you are getting one of those invalid certificate errors, it could be because your employer is blocking those certificates, you can get around this by modifying your /etc/yum.conf file and by adding the following line to allow unsecured ssl connections:

sslverify=0

Step 5

Install a bunch of developer tools, including GccXml:

[shell]
sudo yum install gccxml git automake make cmake gcc gcc-c++ libtool
[/shell]

Step 6

Install Reflex Reflection library

[shell]
git clone git://github.com/GiannisRambo/Reflex.git
cd Reflex
build/autogen
./configure –enable-minimal
make
sudo make install
echo "export LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH" >> ~/.bash_profile
source ~/.bash_profile
[/shell]

Step 7

Run Sample Reflection Application

[shell]
cd SampleReflectionApp
make
./SampleReflectionApp
[/shell]

Part 2 - Linux (Fedora Core 20 32-bit and 64-bit) For part 2 of this article, I tested out the instructions using a Fedo...

Read More »

Reflection with Java-style Annotations in C++ on Windows using Cygwin (Part 1 of 3)

Slider-Reflection-Cygwin

Motivation

I wanted to have reflection with Java-style Annotations in my C++ Applications.  I didn’t want to use C++11 or anything fancy like that and I wanted to be able to take my existing, old C++ applications the way they were and to simply add reflection in the same cool way that my Java applications already have the capability to do so.  Additionally, I wanted my friends that exclusively use OS X or cygwin to be able to run my applications with reflection support as well.  So after a lot of time researching and testing on as many Virtual Machines and actual machines that I could get my hands on, here is a set of instructions that are current as of Tuesday, January 7th, 2014, which also happens to be my name day! (My name is John btw)

Part 1 – Windows via Cygwin

For part 1 of this article, I am including the instructions for running a sample application that takes advantage of C++ Reflection (with function Annotations) using the Cygwin 32-bit and 64-bit platforms.  If you are using a different platform you can skip to those instructions by following one of the links here:

  • Part 1: Cygwin (32-bit and 64-bit) (this article)
  • Part 2: Linux (Fedora Core 19, 32-bit and 64-bit)
  • Part 3: Mac OS X (Homebrew with Intel-based processors only)

Step 1

Install Cygwin with at a bare minimum the git and wget packages with all of their dependencies using the setup installer that you can download from www.cygwin.com.  During the installation process, select the following 2 packages:

  • All->Devel->git
  • All->Web->wget

Step 2

Install apt-cyg, a cool, command line based package manager for cygwin:

[shell]
git clone git://github.com/GiannisRambo/apt-cyg.git
cd apt-cyg
chmod +x apt-cyg
cp apt-cyg /usr/local/bin
cd ..
rm -rf apt-cyg
[/shell]

Step 3

Using apt-cyg, install several required packages.

[shell]
apt-cyg update
apt-cyg install make automake gcc-core gcc-g++ libtool ncurses util-linux cmake python
[/shell]

Step 4

Install GccXml

If you are running 32-bit Cygwin, you can build it yourself as there is no package available from the default Cygwin repositories, or you can follow the instructions to install it from the Cygwin Ports repository.

For more information about the gccxml project, visit the project homepage at: http://gccxml.github.io

[shell]
git clone git://github.com/gccxml/gccxml.git
cd gccxml
mkdir gccxml-build
cd gccxml-build
cmake ..
make
make install
cd ../..
rm -rf gccxml
[/shell]

If you are running 64-bit Cygwin, you will have to download it from the Cygwin Ports project:

[shell]
apt-cyg -m ftp://ftp.cygwinports.org/pub/cygwinports install gccxml
[/shell]

Step 5

Install Reflex (C++ Reflection Library developed at CERN)

[shell]
git clone git://github.com/GiannisRambo/Reflex.git
cd Reflex
build/autogen
./configure –enable-minimal
make
make install
[/shell]

Step 6

Run Sample Reflection App

Now don’t go ahead and delete the Reflex git repository just yet.  In the forked version of this project which I have created, I have included a sample application that demonstrates reflection in it under the directory called “SampleReflectionApp.”  There is a simple Makefile in that directory, and the sample application checks for all annotated functions that reside in the MyClass class.  This should be enough for you to get started for now.  Good luck and have fun!

[shell]
cd SampleReflectionApp
make
./SampleReflectionApp.exe
[/shell]

Motivation I wanted to have reflection with Java-style Annotations in my C++ Applications.  I didn't want to use C++11 o...

Read More »

Creating a VBA Variant with type “Missing”

Slider-VBA-Variant

How do you test an Excel VBA function that takes lots of optional parameters without making a lot of calls to the same function?

Instead of:

[vb]
If NumberOfArguments = 1 Then
MyFunction varg1
ElseIf NumberOfArguments = 2 Then
MyFunction varg1, varg2 …
[/vb]

Do this:

[vb]
Dim varg1, varg2 As Variant
arg1 = "Some Value"
varg2 = GetMissing()
MyFunction varg1, varg2
Private Function GetMissing(Optional var1 As Variant) As Variant
GetMissingAsVariant = var1
End Function
[/vb]

How do you test an Excel VBA function that takes lots of optional parameters without making a lot of calls to the same f...

Read More »