VBA stands for Visual Basic for Applications, a subset of Visual Basic used in all Microsoft Office Applications. Consider tagging your question with the application as well as [VBA]

learn more… | top users | synonyms

0
votes
1answer
182 views

Outlook 2010 Run Script via Rules

I have the following subroutine in ThisOutlookSession: Sub receiveMtgRequest(Item As Outlook.MailItem) MsgBox "You have received a meeting request: " & Item.Subject End Sub I have set it to run ...
0
votes
0answers
97 views

Outlook VBA not recognising Inbox subfolder

There are 3 email addresses controlled by Outlook. When an email arrives to a specific email account, a specific word in the subject line directs the email to one of 2 sub-folders: PHY2048 or PHY2049. ...
0
votes
2answers
167 views

How to merge rows with same Name merging data of each ?related column

I need to merge rows with same Name preserving data of each column. For example, if we have two rows with the name "Mr Bean" on the first column "Name" then merge data of each column related to rows ...
0
votes
1answer
322 views

How to combine values from multiple rows into a single row using module?

I'm looking to combine multiple rows into a single row based on a value in the code column.. I've noticed other questions on here similiar to my question but I cannot seem to extend the range.. Code ...
4
votes
2answers
436 views

Using English macros in French version Excel

I am currently in France and am using a computer on which all Office programs are in French. I need to use a Macro which has been written in English VBA, but it fails. I assume the issue a language ...
0
votes
1answer
298 views

Macro to Import CSV files into Excel

I have a bunch of CSV files in a folder. I'd like to import each file into Excel using the 'Import from Text' tool by typing the name of the file into a cell. I then need to format all of the data ...
0
votes
1answer
517 views

How to format cells between two dates with a colour based on a value in vba?

(apologies if this question is difficult to understand, i'm unable to post an image) I've tried finding a solution for this online but haven't had much luck. Ideally, I want to use conditional ...
0
votes
0answers
95 views

I'm looking to create some VBA code to search for other instances of certain string, move original instance above found

Please excuse me if I'm posting incorrectly in any way- this is my first go round on superuser. I'm looking to create a fairly basic VBA macro to automate a process in excel I'll otherwise have to ...
2
votes
2answers
85 views

VBA Syntactic Sugar

I use VBA in my work every day, but I didn't know about Range syntactic sugar. I just knew last month when I saw MSDN Range page. I tried to find an article with this features, but I didn’t find any. ...
0
votes
0answers
76 views

MS Access Personal Macro Workbook

In MS Excel I have a personal macro workbook that is with me no matter what excel file I open. Is there a similar solution available for MS Access? The reason I am working on this is that i want to ...
0
votes
1answer
174 views

How can I create a persistent data connection from MS Project 2013 to Excel 2013?

I'm trying to get dates from an MS Project file to come across to a separate Excel file which I'm using to run conditional formulae on to handle the project status matrix. The catch is that I need ...
2
votes
2answers
350 views

VBA Excel 2007 help to speed up code to hide rows [closed]

I am trying to write a VBA code that automatically hides rows if a value in the row is equal to "". My range of values is A37:A400. Because my range is so big my previous VbA is to slow and looks one ...
0
votes
1answer
69 views

Changing the color of a shape every 5 seconds in excel using VBA

Hello I am looking for the VBA code to change the color of a shape in Excel using VBA every 5 seconds from when I click a button. the name of my shape is "Rectangle 1".
0
votes
1answer
507 views

Updating another Excel spreadsheet from current spreadsheet

I used the VBA code in "How do you write an Excel formula that will paste a specific value in a different cell?" posted here in May 2013 and it works well to populate/fill another cell in the same ...
0
votes
0answers
139 views

how to convert data in table format to pivot format

I would need help in converting table which is in table format to a pivot format. Below is the sample data which i have: ![Input File][1] Product Currency Value US UK Japan Ind ...
1
vote
2answers
88 views

Cleverly locked myself out of excel's vba editor in my worksheet

I'm working in Microsoft Excel 2010 I was creating a worksheet that is supposed to be hardt to screw with for the person other than me who used it. To modify data in the sheet I utilized a userform ...
3
votes
2answers
80 views

Check value is numeric and no more than n digits

I'm trying to add some validation to a VBA sub and I need to ensure the user enters a number and that it is no longer than the set limit, I'm pulling this in using a function as it varies depending on ...
1
vote
2answers
36 views

Copy Columns until a boundary

Am trying tell VBA to copy all the cells from Column "Data_FirstCoumn" until "Data_Boundary" Column. However VBA keeps throwing up an error stating that "AutoFill method of Range class failed". ...
1
vote
1answer
54 views

How to create multiple rows combining data sets

I have three tables and i need an out put which has data from two tables, i would like to create the same using macro. Table A A B C D Table B Apple Orange Pears Table C Americas Asia Europe ...
0
votes
1answer
172 views

Insert columns, within a range, based on cell reference

So am trying to tell VBA to insert a certain number of columns between two other columsn based on a cell reference. I've managed to get excel to insert columns within my range: Sub INSERT() ...
0
votes
1answer
59 views

compare and update spreadsheets

Please I need some help with excel spreadsheet here. I have two worksheets, one holding the old records and the other holding the current record. What I wish to do is to develop a vba code associated ...
1
vote
2answers
80 views

How do I split a directory when a field changes in Word 2010?

I'm creating a directory mail merge in Word 2010 using an xlsx file as the record source. One of my fields is "Manager". Most of the fields will be different on every line, but Manager will be ...
2
votes
2answers
69 views

Insert specified number of columns between two named columns

I am trying to use VBA to insert a set number of columns between two preexisting and defined ones. However, it keeps inserting the new columns to the left of the range. I want to insert the columns ...
2
votes
1answer
960 views

Using VBA to name a cell name box in Excel

I would like to iterate through rows in a worksheet and assign the name boxes of one column (the E column) to the value of that respective row in another column (the B column). I would like to ...
2
votes
1answer
139 views

Excel VBA code Private Sub Worksheet Change Power function not working

I'm making a worksheet where the wind speed defines the potential energy of the location. This value is the basis of a few sheets in the same Excel file. I'm trying to write a code that where I10 is ...
0
votes
3answers
87 views

Combine rows in Excel

I have data in column 1 and data in column 2 as follows: 1234 eggs 1234 bacon 1234 toast 4321 Orange Juice I want it to appear as follows: 1234 eggs-bacon-toast 4321 ...
0
votes
1answer
96 views

Transpose data in columns to rows downwards

I am working on a Excel VBA Project. I have data in an excel file as such (each alphabet in each cell). I have many lines as such and each line will definitely have data in the first 6 cells, with ...
2
votes
2answers
198 views

Excel VBA Replace Character

I tried looking around for this particular problem, but couldn't find it. I am trying to replace an assortment of characters in a string. I tried looping through the characters using their character ...
0
votes
1answer
178 views

Generate ordered numeric list in Excel based on cell value

I'm not sure if this is possible, but I would like to create an ordered numeric list automatically based on a cell value. For example, if I have a cell with a value of 100, I want excel to ...
2
votes
0answers
280 views

Splitting an excel 2010 spreadsheet into multiple workbook files based on column value

I find and clean a lot of contact data, sorted by country, which I am currently using excel to manage. Mainly because it is easier to clean and manipulate the data I find this way, and I can easily ...
0
votes
0answers
407 views

how to get encode type of text file using vba

I would like to check encode type of text file is UTF-8 without bom or SHIFT-JIS. Because I change to SHIFT-JIS if encode type is UTF-8 without bom. So I want to get encode type of text file. What is ...
0
votes
1answer
236 views

How to convert UTF-8 to SHIFT-JIS using vba

I am developing an application that reads from a text file and writes to a CSV file. Since characters in the text file are UTF-8, the CSV file also contain the same characters. Because of UTF-8, ...
0
votes
1answer
49 views

I'd like to make a line of code which prints a vlookup formula to the cells going down a column

This is the formula I'd like to print to each cell going down the column: =VLOOKUP(CONCATENATE(E2,C2), WORKABILITY_INDEX!$A$1:$B$82, 2, FALSE) I am using a statement like the one below: Last = ...
0
votes
2answers
50 views

Excel VBA: String manipulation

The following gives first name, space and last initial. I would like first initial and last name without a space between. Sub FNLI() Dim cell For Each cell In Selection cell.Offset(0, 1) = ...
1
vote
1answer
113 views

Need a Excel script to identify email addresses that contain a different variation of the first name of the contact

I have an Excel spreadsheet with 50k+ rows of data, where we are trying to identify within the rows of data where the email address has no match of the first name, etc. We are basically trying to ...
-1
votes
1answer
127 views

How to generalize a macro to any row

The Excel macro below is written to function on a specific row (row 2) of Excel. I would like to be able to apply it to any row that I select rather than just to row 2. Does anyone know how to adapt ...
0
votes
1answer
271 views

How to one-click print in Access 2010

I want to create a button on a form in Access 2010 that, when clicked, prints the current record/view of a form. I have tried various VBA scripts. Some print all records, others print partial parts of ...
1
vote
1answer
374 views

Expand or minimize worksheet groups on Excel's tab bar

Is there a way to group worksheets in Excel 2010 so that not all tabs are immediately visible? Basically, so that they could be expanded and minimized as needed. I have a few Excel workbooks with ...
0
votes
0answers
304 views

Fill a web form with data from excel (macro)

I am new to VBA and I am struggling to find a solution for my problem. I have an excel database with UNs and PWs for a number of profiles. I also have an administrator UN and PW and each time I want ...
0
votes
2answers
2k views

Checkbox in dropdown list

I have a table in excel where I can select multiple items from a dropdown list in one cell. Now, using my macro I have to pick all of the options separately, and they are added to a cell one by one. ...
0
votes
0answers
211 views

VBA Macro to sort and apply conditional formating to a range of cells with dynamic number of rows

I have a range (the image below). Please note that: Range is generated by another application, so number of rows is ever changing, and is not formatted as an Excel 'table' The number of columns, ...
1
vote
1answer
473 views

How to check data exists or not in array and add items to array using VBA

I always write data 【AAA, BBB, CCC】into CSV file. I would like to also write other data (eg:DDD) if there is in text file. An array: arr = Array("AAA", "BBB", "CCC") Text File(Read): AAA BBB ...
0
votes
0answers
35 views

How to group data of text file using VBA

I would like to develop following flow. What is the best way of doing this? Text File(Read) AAA BBB CCC BBB CCC AAA AAA CSV File(Write) AAA, BBB, CCC
0
votes
1answer
832 views

How to read from second line of text file using vba

I would like to read from the second line of a text file to write its data into a CSV file. What is the best way of doing this? Open InputFile For Input As #1 Open OutputFile For Output As #2 ...
0
votes
1answer
220 views

Excel 2003 file with Visual Basic is crashing Excel 2013

I have 2003 Excel file with Visual Basics code in it. It works fine in versions up through Excel 2010, but it does not work in Excel 2013. Excel crashes whenever VB functionality is used. I have ...
1
vote
0answers
88 views

Is there a macro to filter table by some list elements?

I have a table with entries based on a list and I used a macro I found somewhere to be able to add/remove multiple elements from the list to one cell, let me show you an example: TEST TABLE test1 ...
0
votes
1answer
96 views

How to format time with decimal places with excel vba?

I'm trying to write a macro that takes a time value in seconds (decimal) and converts it to mm:ss.00 format (two decimal places.) The closest I've come is this: Application.Text((1.23 / 86400), ...
0
votes
1answer
284 views

Create Sequence Diagram Using VBA

I would like to create sequence diagram with data of reading text file. Moreover I want to output that diagram in Excel. Using Language is Excel VBA. What is the best way of doing this?
0
votes
0answers
133 views

Excel VBA Chart.Export File size too big. How to resize the exported PNG file

I have recently taken over this process where I will need to manually copy a range from an excel spreadsheet asPicture, and paste it in a email body as bitmap. This is so that the recipients of the ...
0
votes
2answers
127 views

How to replace at a specific position in a string using vba

I would to replace one value in a string of text file. If I try the replace that value with Replace method, all same values get replaced. I just want to replace the one at specific position in the ...