Category "vba"

VBA Word - InsertFile changes the style (font, size...) of the bookmark and adds a new line

I'm trying to fill a Word document with plain text files in VBA. Here is what I have : The Word document has bookmarks with default text inside (this helps me t

Error 1004 keeps popping out when trying to execute the sort VBA command

Part 1: Please help to advise where did it went wrong. Would like to sort for column E via descending order with header Sub SortRows() Dim destSht As Worksheet

Clear the Multiple Page content in simple coding

Hi I am having 11 sheets in my workbook. I need to delete some contents in all the sheets except 1 sheet. I have written some code. while I am rund the code act

Object required for comboboxes/checkboxes that already exist on my worksheet?

Okay, totally noob coder here. I'm working on a sheet that has a repeating series of 1 combo box linked to one other combobox and a checkbox. Basically, the fir

How to reduce the displayed Majorgridlines in order to match them to the "Category" texts?

Within this picture, an Excel chart is displaying approximately 100 values + times (red curve): Excel is "intelligent enough" to reduce the number of the displ

Transferring string arrays from VBA7 to C++

I'm currently working on a project where I want to be able to manipulate and graph data with relative ease in Excel. However, a lot of the data involved exceeds

Loop through three specific Outlook folders

I have Excel VBA code that imports Outlook mail data from one folder into Excel. I change this for three folders all at the same level (not subfolders). Is ther

For Each Loop stops after deleting one row

I am trying to use an if else statement to delete the entire row when a text value is found in a cell within a given range. The code stops after deleting one ro

Excel convert digits into respective words [closed]

I would like to convert the number of digits in excel into respective words as shown in the picture above. How can I achieve this functionali

System error when opening macro &H800700C1

I was using regularly a macro add-in in excel which stopped working all of a sudden. I get several error messages in the following order when I launch the macro

Exporting sheets as pdf error: Run-time error '1004'. We didn't find anything to print

I'm trying to export all sheets in the workbook as separate pdf files using one button. I followed a YouTube tutorial: https://www.youtube.com/watch?v=FRZ6n3gHt

Save InlineShape picture to file in Word VBA

I am trying to extract a picture from a Word document and save it in a file, using vba. I don't really care about the output format, as long as it is readable.

Copy rows with different lengths into two columns

I am trying to convert data from rows with different lengths into two columns. The value of the first column remains equal to first cell of the row and is copie

How to initialize a listbox to a desired starting point in the list?

I created a macro for Excel which opens a list of all visible sheets in a workbook and goes to the desired sheet as you scroll through the list. The idea is to

Apply code to active document not document opened with Documents.Add

I got a VBA project from colleague who is retired. I have to change a function: Documents.Add Template:= _ "c:\word\Link.dot", _ NewTemplate:=False, Doc

Copy multiple ranges of different length in a loop that searches every Excel file in subfolders and paste on new master worksheet

How do I copy/paste multiple ranges? The code returns the cell A1. What I need: 1- Search and open all Excel files in a folder with subfolders 2- Copy specific

How to call a userform's subroutine within a a separate module's subroutine with VBA

I am wondering how I can call a public subroutine that resides within a userform of two option buttons. Specifically if that user selections optionbutton1 from

How to call a userform's subroutine within a a separate module's subroutine with VBA

I am wondering how I can call a public subroutine that resides within a userform of two option buttons. Specifically if that user selections optionbutton1 from

Add reference to closed workbook and be able to open it

In the sub workbook_open I'm opening 4 workbooks in the background to be able to have references to them without having them "open". (they are not visible) But

Loading Excel row with data using ListObject

I am attempting to load rows in an Excel worksheet, "List of Golfers", from worksheet "Players". On the Players worksheet I have a table named "GolfTrip". On th