Category "vba"

VBA Open excel file from Sharepoint with changing name

I am trying to generate some code that will open up an excel file on Sharepoint and copy data into another spreadsheet. I have been using the below code when th

how to launch a Data Wizard (create diagram from a template) in Visio from Access

I'm trying to make a button in Access, that will open Visio and launch a Data Wizard to create a diagram. I've tried various solutions, but all I get is opening

Loop through folder get data from specific ranges copy to master

Im working on creating an macro that will pull data from a specific group of ranges across many files in one folder and feed that data into a master file in the

sql connection to populate table condenses rows

I have an Excel sheet that has a connection to SQL server to generate some table data into the spreadsheets. There is a strange issue where the spreadsheet get

sql connection to populate table condenses rows

I have an Excel sheet that has a connection to SQL server to generate some table data into the spreadsheets. There is a strange issue where the spreadsheet get

VBA script Not Copying Data - Inserting #REF

I have 1 workbook with multiple sheets and I am running into an issue copying over data from one sheet to another. Sheets - "ALL CONTACTS" & "MAA DATA" Ther

The while loop sometimes is infinite

Sub Copy_Worksheets_Columns_Rows_to_ALL_D2() 'PURPOSE: To loop through all Excel files in a user specified folder and perform a set task on them 'Task:

On a network, using VBA how to find the machine where a file is open

Sometimes I need to open a file that is already open, and I would like to close it. For that I need to know which machine on the network has it open. How would

Excel Add Rows and Value from Excel Table to Specific Word Table Template

Thank you in advance, I need help in completing the below code, the code currently works to add the number of rows in the Table(3) of my word template as per th

proper error handling for resetting Hourglass

I have a project with a number of instances of DoCmd.Hourglass -1 <various code> DoCmd.Hourglass 0 <other code> Any time there

how to stay same cell after hit enter and move cell value to down

I need to stay at the same cell in the excel sheet and copy the cell value to down after hitting enter. need to keep the most recent value at the top and shift

An R Loop to wrap text in multiple saved excel files

I have hundreds of excel files with a single column and a single sheet containing text. I am trying to write a loop that will 'Wrap Text' and align the single c

Select a table error: Range Object variable or With block variable not set

I am trying to select part of a table. To select the whole table, I found the first cell (e.g. A1) to the last cell (e.g. C10) of the table. I thought I could s

Count and list all values

I'm trying to loop through cells of a specific column, find new values in those cells, count how many times a specific value is found and return the values alon

How to change value of iRow depending on object value?

I am looking for the iRow value to be dependent on whether the object value. I have 2 buttons: Private Sub OptionButton1_Click() End Sub and Private Sub Optio

Subtract the date from each cell in a column, skip cells that have string values

I have an Excel sheet of expiration dates. Some rows lack an expiration date so I chose to fill those cells with the string “NO DATA”. I want to loo

Array only fills on first iteration of loop

I have a results table with multiple results for multiple samples, and a sample list array containing each unique sample reference value in the results table. I

Retrieving a zip file from a web site using Excel VBA

I'm trying to download a zip file from a public web site http://serviciosede.mineco.gob.es/indeco/BDSICE/homebdsice.aspx. To download the file this site execute

Merging csv files deletes data

I need to choose and merge multiple csv files. All are in the same structure, however the name of file and sheets change. The separator is ; The code merges the

Listbox search and delete

My datasheet: sheet ("Database") - A1 to L10000 (entries) Headers of each Column in A1 to L1 I tried to search the sheet with a userform. I used a ComboBox beca