Tagged Questions

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

extracting labels of data in a pivot table

When I move the mouse pointer over data in a pivot table it displays what are the row and column labels (names of pivot items). How can I extract them so I can later use them in a code (when I want ...
1
vote
2answers
129 views

Changing DateTime format in multiple CSV files

I've got multiple csv files with this structure: text, text, 01/27/2001 01:00:00 PM I need to update ALL csv files with this datetime format: text, text, 27-Jan-2001 13:00:00 Is there a known ...
0
votes
1answer
59 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 ...
2
votes
1answer
92 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 ...
0
votes
0answers
33 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
2answers
562 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
36 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
145 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
487 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
43 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
96 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
78 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
65 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
1k 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
94 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
114 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
39 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
46 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
34 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
50 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
1answer
46 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
42 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
27 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
141 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
54 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
1answer
147 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
15 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 ...
1
vote
1answer
72 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
41 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
122 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 ...
0
votes
0answers
51 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
454 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
48 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
37 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
2answers
782 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
67 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
103 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
136 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 = ...
5
votes
5answers
2k 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
286 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
46 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 ...
1
vote
0answers
52 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
3k 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
52 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
73 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
301 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 = ...
0
votes
1answer
688 views

Copy from sheet2 to sheet1 based on if values match

The goal of this code is to iterate through a column in sheet1 and check to see if each value matches that of values in a row in sheet2. If the value matches, copy 5 rows of information from sheet2 ...
0
votes
2answers
26 views

Error when value not present

I am using the code below several times over in one sub for different values not just "CPNEC". It works fine where there is a range with that value on the spreadsheet but falls over it the value does ...
-1
votes
2answers
214 views

how to create excel charts having strings in both x and y axis

I have a student data with Student Name and their grade (A/B/C/D/E.). Now I want to have a graph for this data. Kindly help me.
0
votes
2answers
70 views

How to shift unique values down a column to the same value in another column?

My friend has two columns where one has unique values and another column has those same values but also duplicated like shown below Column 1 Column 2 ABC123 ABC123 CDE456 ABC123 EFG789 ...