VBA

6K

Solutions

22

Articles & Videos

2K

Contributors

Visual Basic for Applications (VBA) enables building user-defined functions (UDFs), automating processes and accessing Windows API and other low-level functionality through dynamic-link libraries (DLLs). VBA is closely related to Visual Basic and uses the Visual Basic Runtime Library, but it can normally only run code within a host application rather than as a standalone program. It can, however, be used to control one application from another via OLE Automation. VBA is built into most Microsoft Office applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

I had a need for a “colour picker” for the nice original Windows Phone colour palette. The codes are impossible to remember, so I was looking for a method to point and click to copy a value for later to be pasted into a property pane.

As I wanted all values presented in the three often used formats for CSS, VBA, and as hex values - and had the colour values as an enumeration – I also needed some converter functions. Not much, and with a simple loop all field values could be set.

However, writing code for 63 fields looked like a daunting task. This is where WithEvents came in and solved that with a few handfuls of code.

I wrote it all up here as there are so few examples found demonstrating WithEvents:

    https://www.experts-exchange.com/articles/29554/Create-Windows-Phone-Colour-Palette-and-Selector-using-WithEvents.html

with a reference to John Colby’s old tutorial on WithEvents for the interested reader. The only principal difference to John’s example is, that I didn’t use 63 variables but a collection (as I learned from Shamil Salakhetdinov) to hold the controls.

The colour palette of Windows Phone I have previously used here:

    https://www.experts-exchange.com/articles/17684/Modern-Metro-style-message-box-and-input-box-for-Microsoft-Access-2013.html

/gustav
3
 

Expert Comment

by:Daniella Barion
That's great. I am sure it will help a lot of people.
0
[Webinar] Learn How Hackers Steal Your Credentials
LVL 8
[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Helen Feddema is one of our resident Microsoft Access experts.  She just published two new articles today.  If Access is something you're interested in knowing more about, then follow Helen!
https://www.experts-exchange.com/members/Helen_Feddema.html
2
New member today got a solution today.

After searching the net for help it became apparent that there were professional contributors on your site willing to provide expert advice. The advice given was very fast and first class.

Fred
This was their question that was answered.
https://www.experts-exchange.com/questions/29012797/Create-Dynamic-Range-Via-VBA.html
3
4
 
LVL 46

Expert Comment

by:Jackie Man
You need to install software like sophos intercept x in computers inside your network to block it.
3
 
LVL 6

Author Comment

by:Brian Matis
Personally, I'm just avoiding opening any Word docs from anyone I don't know... And to some extent, even from people I do know... Most of my document usage these days is with Google Docs, so it's pretty rare that I need a Word doc!
1

VBA

6K

Solutions

22

Articles & Videos

2K

Contributors

Visual Basic for Applications (VBA) enables building user-defined functions (UDFs), automating processes and accessing Windows API and other low-level functionality through dynamic-link libraries (DLLs). VBA is closely related to Visual Basic and uses the Visual Basic Runtime Library, but it can normally only run code within a host application rather than as a standalone program. It can, however, be used to control one application from another via OLE Automation. VBA is built into most Microsoft Office applications.