Excel – Adding a Progress Bar

I was recently doing some work for a client in which I build an Excel WorkBook that processed a series of large CSV files to clean them up, format the content, … because of their size the process could take several minutes and they contacted me thinking it wasn’t working and that they thought the process had hung.

So I set out to provide them with a visual display of the process’ progress, a progress bar!

Continue reading

Open CSV with Alternate Delimiter in Excel

A CSV (Comma Separated Values) as it’s name implies is supposed to be a file in which each line represents a row of data and each row has a series of values which are separated by commas.

Well, I had a client share with me a CSV in which all the values were separated by semi-colons (;). I thought, makes no difference, go into Excel, Open, … and there were no options anywhere to apply settings for the Open/import process. Thus, open opening the file, I had a big mess on my hands.

So what is one to do exactly?

Continue reading

Unblock Macros – Error Applying Attributes

If you’ve been following my blog in recent months you are aware that Microsoft is now blocking macros downloaded from external sources (e-mails, internet, …). If you aren’t aware then I urge you to review:

Now, I wrote about unblocking the macro so you could use the files again, refer to:

but recently a fellow MVP brought up a weird error when they tried to unblock a file and I thought I’d post the information here for all to benefit from.

Continue reading

How-To Emulate Client Drives

Hard Disk

Have you ever wanted to emulate a Client’s drive setup? So you could relink tables to match their network setup to make it easier provide updates to them?

One complex option is to get into creating disk partitions, but who want to do that!

Did you know there is a very simple solution that most people are not aware of?!

Good old DOS provides us with all we need with the subst command.

The subst command allows us to define a drive against a folder.  So you can use it to emulate any client setup.

Note
All of the following instructions are done via the Command Prompt.  If you want to automate this, you can equally use BAT files, VBAcripts, VBA, …

Also note that the commands presented below are all case insensitive, so you can use uppercase, lowercase, it makes no difference here.

Continue reading

The Day I Stopped Using FireFox

Goodbye

So yesterday, I received a nice notification from Google:

Our team has reviewed your content, and, unfortunately, we think it violates our harmful and dangerous policy. We’ve removed the following content from YouTube:
 
URL: ht​tps://www.​devhut.​net/bypassing-microsofts-new-blocking-of-macros-vba-code/
Video where URL was found: Understanding Macro Blocking and Unblocking Google

Side note: GMail report Google’s own e-mail to me as “This message seems dangerous”!

Once Google did this, my webpage via Firefox started to load to:

Continue reading

VBA – Format As Sentence Case

Alphabet

We are lucky that we have an arsenal of tools, functions, … to format strings, things like:

  • UCase
  • LCase
  • StrConv

But one that has been lacking, for my needs at least is a means to format a string as Sentence Case (Capitalize the first letter of each sentence and so I thought I’d share my solution in case it could help others.

Continue reading

VBA – Convert a String to Camel Case

Smiling Camel

Previously, I published an article on Splitting a Camel Case String back to plain English:

Today, I thought it a good idea to publish the code to do the inverse, that is to take a normal string and convert it to Camel Case.

Continue reading

VBA – FSO Files, Folders, Drives and More

Over the years, I’ve posted punctual articles relating to individual FSO solutions:

and many, many more.

Today, I thought I’d provide you with a complete breakdown of the File System Object (FSO) most common functions to give you a proper overview of just how useful it can be to you when you need to interact with File, Folders and more.

There’s a lot of content to this article so I’ve broken it up into the following sections:

Let dive in!

Continue reading

VBA – Bring a Window to the Front Without Knowing Its Hwnd or Title

I’ve made a couple previous post relating to bringing windows/applications to the foreground:

I was recently thinking about it, especially the case where we can’t directly retrieve the Hwnd value from the instance and I use the Title to find it and I had an idea and thought I’d share it with you all.

Continue reading