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
21 views

Excel - How can I collapse data, eliminating blank rows?

I have a 3 column, 20 row table. (A1:C20) The 3 columns are each 1 digit of a 3 digit number. Some of the rows have 3 digits, some are blank. I need a way to return all the non-blank rows of 3 ...
0
votes
0answers
11 views

Excel VBA - User Defined Function to turn string into formula

I'm looking for something similar to the solution posted here: Excel function that evaluates a string as if it were a formula? Problem is this does not seem to work with a function in there. This ...
-3
votes
0answers
12 views

Automatically move Outlook message to the specific folder when click on reply to all

I want if i recieved any outlook message from aspecific person. Firstly It comes directly in my inbox folder. But when i reply to the same message, then a script runs save that particular old message ...
0
votes
0answers
20 views

Keep header text in Excel, but change font

I've seen several examples for changing the header font in Excel; however none of them just change the font. They seem to always incorporate static text or a cell reference. How do I change just the ...
0
votes
0answers
20 views

excel - ask for input to be used as new cell values

I use excel 2007 and I want to create the following function: At first I need to add a vba function button that prompts the user to add four different values, e.g. a name, a number, a date and an ...
0
votes
2answers
27 views

How can I trigger an Excel macro by hovering a mouse over a cell?

I have not been able to figure out how to run an Excel macro by moving my mouse over one or more cells in my spreadsheet.
0
votes
1answer
22 views

How to Run macro in excel instance “2” from excel instance “1”

Lets say i have already opened Workbook 1 in Excel instance 1 and Workbook 2 in excel instance 2 And i have macro called "AAA" in instance 1 and "ASD" in instance 2 i want to call "ASD" in instance 2 ...
5
votes
2answers
73 views

How do I add VBA in MS Office?

I've seen posts showing answers which use VBA (Visual Basic for Applications) code/macros, however, I've also noted additional comments afterwards about how to use the VBA (how to implement it). I'm ...
0
votes
3answers
79 views

Excel formula to compare single value in one cell with multiple values in other cell

I have a value in Column A, which I want to compare with multiple values in column B, and depending on that value, put the answer in column C. For example, using the table below, it searching in ...
0
votes
1answer
23 views

Excel macro to save workbook on another session of excel

Im trying to make a macro in one session of excel that saves a particular workbook in another session of excel. Lets say i have Workbook1 and Workbook2 and i have opened them in different excel ...
0
votes
1answer
18 views

Excel: Find a specific cell and paste the value from a control cell into it

I have two columns one containing the room number, e.g. B-CL102, the other containing a varying integer. I want to enter a different, manually determined, integer in a third column. Whether by macro ...
1
vote
1answer
22 views

VBA + Polymorphism: Override worksheet functions from 3rd party

my company makes extensive use of a data provider using a (closed source) VBA plugin. In principal, every query follows follows a certain structure: Fill one cell with a formula, where arguments to ...
0
votes
1answer
29 views

Excel VBA Insert Character Between Number and Letter

I would like some VBA code that would allow me to detect if a string contains any instances of a number followed by a letter and then insert a new character between them. For example: User enters the ...
3
votes
2answers
69 views

Creating folders and sub-folders with a VBA macro

I'm looking to use a spreadsheet I've created to generate folders and sub-folders based on what is in each column. The first column is the top level, the second column the next level down ...
0
votes
1answer
31 views

Use VBA in windows to run a python method with arguments in Linux?

I'm using MS Access on a Windows 7 PC as the front end of a MySQL database back end that is stored on a SUSE Linux Enterprise server. Python is installed on the Linux server. The python script I want ...
1
vote
0answers
16 views

run-time error 1004 Application Defined or object-define error

I have this macro that I wrote: Dim lastColumn As Long lastColumns = wkbWorkbook2.Worksheets(2).Cells(1, Columns.Count).End(xlToLeft).Column 'this is the highlighted part in debug SourceRange.Copy ...
0
votes
0answers
15 views

How to keep formulas in the destination cell

I'm using vba to copy data from several workbooks and put them together in one sheet. I'd like to know how to paste the new info maintaining the format and formulas in the destination cell. The copy ...
0
votes
1answer
20 views

Get data from another Excel file

I have an Excel spreadsheet that contains a list of usernames Each user will have the following code. I just need to find a way to substitute First.Last with the names in the Excel spreadsheet. There ...
-1
votes
1answer
25 views

Excel: Averaging Sensor Data by Time Stamp

I have a device that collects temperature measurements from several sensors at discreet time intervals. This data is dumped into a .csv file with each row formatted as: [time] [sensor name] ...
1
vote
0answers
45 views

Windows (partially) claims I have a private key for a foreign certificate

We have a MS Word document template with vba code produced and signed by an external firm. When I view the details of the signing certificate from within Word vba developer tools, it shows up with ...
0
votes
0answers
16 views

Opening Numerous Closed Workbooks into One Workbook with multiple tabs/worksheets for each closed worksheet

I have a folder with 20 worksheets each worksheet conatins a scorecards which is (protected/ no password) and not in your typical table format. I want to have a macro to open all 20 of these ...
0
votes
1answer
32 views

Insert new rows and autofill with formula

I am trying to insert new rows if a particular condition is met. I want to drag the formula from the last row to the inserted row, but I am getting an error doing so. Below is my code: For i = 1 ...
-2
votes
1answer
32 views

sum the values in a column and add the sum to the filename of a workbook

Hello I have been able to create new worksheets based on unique values in a column. In addition to this, i want to sum up the values in a column and include this sum in the filename of each ...
0
votes
1answer
24 views

Get result of formula as text

I have an Excel doc which populates a matrix using formula, for example; | A | B | C 1|=1+2 |=2+2 | 2| | |=4-1 would display as; | A | B | C 1|3 |4 | 2| ...
1
vote
1answer
27 views

Excel: create folder VBA script - get value from selected cell?

I am using a VBA code to create a new folder in a directory. What I want to do is get the new folder name from the selected cell. Any ideas how I can do this please? Here is the code I have so far. ...
1
vote
1answer
24 views

Outlook 2013 VBA: Refer to editor in reading pane

I am trying to assign a category to a message when sending it (a 'Send Now' category to override a send delay). The macro below works fine when editing the message in a separate window, but it hangs ...
0
votes
0answers
24 views

Dynamic Excel page with many referances

I want to build a dynamic spreadsheet. I have a blank template for entering weekly information about different locations. Once this information is inputted it is saved as a new sheet and titled for ...
0
votes
1answer
49 views

Merging multiple excel files in to one file

This is my macro for merging all the files in one directory to one excel sheet. I am unable to find why its not working as per expectation. I have thousand rows in each file. It copies 1000 rows from ...
0
votes
0answers
7 views

Linking a cell to a specific part of an ActiveX textbox

Is there a way in Excel to have a cell refer to a specific part of an ActiveX textbox? I have a large list of references in one ActiveX text box, and in another sheet I need to input various ...
-2
votes
0answers
16 views

Combining rows with same customer name and Sum amounts

I am pretty new to writing VBA... I am needing to combine like rows into one line, so for the attachment I need to sum all the amounts in rows 16 & 17 together into one line
1
vote
1answer
41 views

Working with cell addresses in excel with VBA

I have a Excel sheet in which are multiple forms. The forms look all the same and they have exact the same cells between them. They are ordered in 4 x 3: x x x x x x x x x x x x x x x x .... There ...
1
vote
1answer
29 views

Automatically “comment out” formula in Excel?

So I have this result set in MS SQL Management Studio. And I have an Excel sheet. I copy and paste data from MSSMS to Excel. As far as good. Now, some of the fields start with an equals sign. Excel ...
0
votes
2answers
43 views

How to repeat "copy range (A1:A5) to Range B with transform (column to row)?

I have a data in the Range A 1 a1 2 a2 3 a3 4 a4 5 a5 6 b1 7 b2 8 b3 9 b4 10 b5 and I copied A1 to A5 to Range B10, B1 to B5 to Range B11, C1 to C5 to Range B12 and so on with transform (from ...
-2
votes
0answers
18 views

Adding button to Excel VB

I need help with the Excel spreadsheet. When I click "Add Commodity" on the left hand-side I want it to show exactly those activities described on the sheet:
0
votes
0answers
20 views

Powerpoint loop single slide until click

I have a slide with some animation. I want at the end of the slide for the animation to repeat continuously until I mouse click or press ESC. Is there any way to do this? (Even programming with VBA ...
1
vote
1answer
81 views

Outlook VBA - how to copy the currently selected text into clipboard?

My question How can get the currently selected text in Microsoft Outlook 2007 in an open message window or in the currently selected message in the preview pane and copy it into the clipboard? ...
0
votes
1answer
20 views

Create button in Powerpoint 2013 ribbon that opens a hyperlink

I'd like to create a button that automatically opens a hyperlink from Powerpoint. It's easy enough to create a hyperlink in Powerpoint (Insert -> Hyperlink) and then click on that hyperlink. I want ...
-1
votes
1answer
26 views

Execute an Excel 2010 Add-In

An excel add-in seems to be the easiest way to share a macro I created with my team. I saved the workbook as a .xlam file and installed the add-in so it shows up under the addins button with a ...
0
votes
1answer
59 views

move worksheet to another workbook, without the vba code but keeping the colour scheme

I current have some code that first copy a worksheet do some cleaning and then move it to another workbook. My problem is that when i copy or move a sheet it also copies the vba code that is attached ...
0
votes
1answer
42 views

How can I send a command to Emacs 24 from VBA in MS Office?

I want to invoke commands from within MS Office application which have a direct effect on my (open) Emacs application, for example do a search for the currently selected text in Emacs I wonder how ...
0
votes
0answers
65 views

Could not load an object as it is not available on this machine - Excel 2010

Got an issue that is driving me mad. Every time a user accesses this file, he always gets the error messages: "Could not load an object as it is not available on this machine" & "Compile error in ...
-1
votes
1answer
29 views

VBA AutoFilter gives runtime error 1004

Could anybody help me find what's wrong in the autofilter line below? It gives run time error '1004'. Sub filter() Dim rng_source As Range Set rng_source = ...
4
votes
5answers
1k views

Excel VBA program only running at 25% speed

I have a VBA program running on my quad-core Acer Aspire S3 Ultrabook. The trouble is, it only uses 25% of the CPU (the other processes combined use ~1%). The laptop runs Windows 8.0. The Excel ...
3
votes
3answers
51 views

Custom Sort using Excel without Custom List

I want to be able to sort excel rows where data looks like Column - 1 Other Columns 701-GBL-1843-MLMK blah 566-JJB-2785-MYJW 254-WYD-3220-NAND 884-GLE-2843-FRYA And I want ...
0
votes
2answers
24 views

Expand Excel ComboBox on click

How can I set up my combo boxes on the form i am building to open automatically when clicked on the field portion not just the arrow? I have been searching for a while and I can't seem to find any ...
2
votes
0answers
28 views

How do I get an event to fire when the slide changes in PowerPoint?

I already know of two supposed fixes, which I will list below, along with the reason they don't work for me. The first is to use the SlideShowNextSlide subroutine. The problem with this is that it ...
-1
votes
1answer
162 views

How to write Excel macro to copy selected row of data between two sheets?

I'm not really experienced in the whole VBA area, i get how macros work but this is just out of my reach. Basically as i stated in the title i need to write a macro that will copy the selected row or ...
0
votes
1answer
36 views

Automating building a table from web sources in MS Excel 2013

I want to build a table indicating a number of things available in a given market. To do this I access the sites with relevant information and copy numbers to a table each day. I would love to ...
0
votes
1answer
22 views

Apply a formula to an entire column since the number of rows is changing from a source file?

I have a connection to a text file source so the excel worksheet updates automatically. Therefore the number of rows is always growing every time it updates. How can I apply a formula to an entire ...
1
vote
2answers
53 views

VBA Copy/Paste Runtime Error

This block of code keeps receiving a Runtime error 1004. I am trying to copy small blocks of information from one sheet to the other if the beginning column names match. For a = 8 To 17 For b = ...