Category "vba"

How to get the "Last Saved By" property for workbook file

In Windows Explorer, if I right-click a file and choose Properties to get the file's Properties window, and then select the Details tab, there is a property lis

How to control image transparency?

I have an image in my worksheet I want to fade out. I am tying to set different stages of transparency for the image: Set myPicture = ActiveSheet.Pictures.Inser

VBA code to count distinct values based on multiple criteria

I have a data sheet "orders" which has data in the format order no Customer Sales Executive Order Status Order Date 211 nokia john cancelled 2

Runtime Error 1004 "Can't find the Paste property for the Pictures Class"

I have several script that have a part that is copying Charts and Pasting it in an area as Picture. Those scripts are working without any error when I look at t

Historical Yahoo Finance API On Fritz Again?

I've been successfully using the Yahoo Finance API cookie/crumb technique to get historical stock quotes for many years. On April 28th, 2022, it broke, and exc

How do i select worksheet using an inputbox in vba

I am trying to select a worksheet every time when i open up a workbook using an inputbox in VBA. here is my code for opening a workbook but after i open up my w

How check incoming emails using SenderEmailAddress?

I have a loop to check for incoming emails from Joe Doe with specific subject. That loop works and saves attachments from Joe Doe. If (Msg.SenderName = "Doe, J

VBA Place Userform Next to Selected Range

I need to place a userform next to a selected cell. Here's my code. Excel 2013. In the userform module: Private rangePosition As Range 'Property passed to for

HorizontalAnchor gives wrong value in Access

The problem: Control.HorizontalAnchor or Control.VerticalAnchor gets a value out of the accepted range. In the IDE window: Debug.Print Btn.VerticalAnchor -->

Can we attach multiple images to a useform in VBA, save in a folder with a specific naming convention and retrieve later using that name?

I have a VBA project where I need to create a userform on which there should be an attachment button to select multiple images and save them in a folder with a

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