Category "vba"

Delete worksheet if it exists and create a new one

I want to look through my Excel worksheets and find a sheet with a certain name and delete that sheet if it is found. Afterwards I want to create a sheet after

PR_SPAM_TRUSTED_SENDERS_W and PR_SPAM_BLOCKED_SENDERS

I've played quite a bit with "PR_SPAM_BLOCKED_SENDERS" ("http://schemas.microsoft.com/mapi/proptag/0x6106001F") and using VBA to manipulate/update my Spam list

Set and retain column widths of Split Form datasheet columns in MS-Access

I'm using a Split Form in Access 2012. Basic datasheet view on top with individual record and form header in bottom pane. I'm trying to figure if there's a way

VBA Outlook code to open Mail Item and Save As text

I'm receiving Outlook mails that have other Outlook mails (*.msg) as attachments. I need them in txt format (or anything else Word can open). I seem to have tw

Outlook security prompt: Sendkeys does not have the right focus

I want to automate some basic operations in Outlook 2014, so I create a macro in VBA. But I need to send an email if any error occur during the execution of the

olMailItem - ReplyRecipients.Add

I am in MS Access 2013 trying to set the Reply To address for a olMailItem with Outlook 2013. My current code is giving me: Run-time error '287' Application-d

How can I pull date from multiple cells from multiple worksheets, or an advanced find and replace

Hello I am just trying to get into a bit of macro programing to help my Mom, and Dad get some excel work done, and they have some ungodly amount of paper work i

How to read mails stored on Exchange server when Outlook only downloads the latest messages?

I'm connected to an Exchange server, so some mails are stored in my local Outlook file and some on the server. In Outlook the item count of the folder shows 13.

Return results from SQL Server stored procedure using variables in ADODB

I'm working on a rec process which will pull data out of a SQL Server database into Excel and out of another application to compare the two sources. I've writt

Take Excel cell content and place it into a formatted .txt file

So I have an Excel document, which is essentially a table. For the purposes of this, we will use this: Dummy Data What I'm wanting to do is take the values fr

VBA Calling WSDL simple method with 1 parameter XMLHTTP

I need some help Calling a wsdl web service function. The WSDL have one function named "Bye" that is waiting for 1 parameter of a type String. Then it gives bac

Can I get data from power query to a vba variable?

I have a power query function, e.g. getData with one parameter filename Can I invoke that function directly in a vba variable? Something like: Sub MyTest() D

vba vlookup does not work in loop

I am working on a tool to analyse data. The data to be analyzed is manually copied into the first sheet, then I am planning to run a macro which analyzes the da

Outlook VBA Access Folders in Shared Mailbox

I have some VBA code in Outlook which behaves perfectly for the main Mailbox - however the same code is struggling when I add a secondary mailbox - this is Outl

Forward Outlook email without adding signature nor From: and To: of original email

I'm looking to forward email that I receive in Outlook to a new address with no changes - an exact clone, no envelope information nor signature added. The emai

Run macro automatically when cell value changed (not changed by user)

Is there a way to have a macro changed when the value is changed is changed, not necessarily when a user changes the value? For example, I have a check box th

Prompt user to select multiple files and perform the same action on all files

The user has hundreds of text files and requires making a change in the data before saving and closing them. Below is the code I have for a single file; how can

Userform - Redirect focus on textbox after MsgBox

I hope this is not that stupid, but I really did not find a post that was working for me. Situation: I want someone to put a date into a textbox in a Userform.E

BSTR's and VARIANT's under... mac os x

Under mac os x I have office 2011 and its excel and VBA, and I have gcc-5.3.0's g++. I played a lot to passing arrays (of numerical built-in types) from VBA to

excel/vba: count number of unique male and female students in list

I have a database of students with names and their gender, however the list contains repeats of students on different dates. How do I count the number of uniqu