Category "vba"

VBA editing cells in protected sheet

I have protected a workbook using vba code. I would also like to let the user entering some values in the specific cells (n4, p7:p10). I have tried by using t

How to search recipients of previously sent mail?

I have a code which checks the subject in my e-mail and warns me if I already sent an email with this subject. I experienced it would be smarter if it checks fo

MSAccess 2010 VBA Open a read-only database

I have a MSAccess database that I'm trying to pull archived data into, from other MSAccess databases that live in read-only folders. So ... Dim aidbx As DAO.Da

MSAccess 2010 VBA Open a read-only database

I have a MSAccess database that I'm trying to pull archived data into, from other MSAccess databases that live in read-only folders. So ... Dim aidbx As DAO.Da

How to Left-Align HTML Table, created from an Excel Range, in an Outlook Body?

I want to copy a selected range from Excel to the body of an Outlook mail (Office 2013). The table is pasting with Center Align. I want to paste with left-align

Excel Function to find a combination of numbers

I have a number on a spreadsheet which is a combination of many different numbers on a list. For example: A list contains: 100, 200, 250, 500, and 1000 The numb

How do I work out how many of each value in a column I would need to add up to a total value in excel?

So say A1 - A8 contain values 11, 120, 321, 435, 623, 765, 964, 1039, B1 Contains a value of 1375 how could use a formula or macro in excel to work out how many

Why is a line added to .Body when creating mail?

I use an Outlook rule to run a batch file in Windows that takes as input the Subject and the Body of the email (this means two arguments). If I run the line dir

Extract the values in a drop-down field

I would like to extract the values in a drop-down field with the title "email address". I would like the name selected to appear in the email "To" line. I'm add

Suppress dialog box for a dropped shape in Visio VBA

When I drop a milestone from the shape master onto a page, a dialog pops up asking for data (milestone date, description, etc.). How can I prevent this dialog b

How can I write this Macro into few lines. I want to get rid of this multiple lines

Sub Flow_Drop() If ThisWorkbook.Worksheets(2).CHECKBOXES("Check Box 1").Value = xlOn And ThisWorkbook.Worksheets(2).CHECKBOXES("Check Box 5").Va

Print original email when it is undelivered

I'm using MS Office 2016 Desktop App on Windows 10. I didn't find any success searching online and also contacting MS Outlook Support to find that there is no e

VBA Outlook: How to get the smtp address of the selected folder account

I have different accounts in my Outlook. Depending on the currently selected folder, I would like to find the smtp Email address of the corresponding account. (

vba set combobox value to multiple cells in multiple sheets

I have 3 combo-boxes and an OK button. I need to set the value of multiple cells in multiple worksheets equal to the value of the combo box selection. Dim choic

What TypeOf are these conversation headers?

I am trying to file emails using a macro, but I am having issues if the user selects a conversation header. What is the typeOf of these headers? I am trying

openform Macro Where criteria

I am using a button from an unbound nav form to open a different form. The button Macro closes the nav form and opens the form I want with no issues. I have a q

Concatenate variable with leading zeroes with another string

Scenario I have an excel cell that contains value with leading zereos (Eg: 0002). My macro is copying this value to a variable called runNumber and pasting it i

Selecting Multiple rows in Excel using VBA

I am trying to process some rows in a sheet with VBA. I want to cut and paste a set of rows from one sheet to the other and struggling to work out the code I ne

VBA if cell on sheet 1 matches a cell in column I on sheet 2 then?

I'm trying to use a vba if statement to check if my cell H22 on sheet 1 matches a cell in column I on sheet 2. can someone please show me where im going wrong?

Application.FileDialog vs GetOpenFilename: What is the difference?

I'm trying to teach myself VBA during the short holiday break. For my first module, I want to create a module that does the following: Displays dialog box. Pro