Visual Basic for Applications; a subset of Visual Basic used in all Microsoft Office applications. Consider using this tag together with the tag for the specific application in question.

learn more… | top users | synonyms

1
vote
0answers
29 views

Assistance with Excel macros

My company uses Excel to track inspections and maintenance of portable fire extinguishers and I'm trying to add some functionality to it but don't have the first clue about how to do it. I'll do my ...
1
vote
1answer
22 views

VBA code to change the selection of a drop down list (combo box)?

I ran the macro recorder and changed the selection of a drop down list that is formatted with data validation, and nothing was recorded. Does this mean that there is no way in VBA to change the ...
0
votes
1answer
19 views

Copy Full worksheet including multiple defined range names using macro or VBA

I've been trying to build a workbook for my company to use to track sales. The problem I'm running into is that I want each user to have their own workbook saved on their local computer for their ...
-2
votes
0answers
28 views

Macro (Need help writing) in excel 2010

I am trying to write a macro that will compare column A and column B. I need it to look at the first number on A and see if there is a match on B. If there is I need it to delete the cell in A and B. ...
0
votes
0answers
24 views

Email Macro Assistance [on hold]

I am not experienced in writing VBA Macros & need assistance to create the following Macro. What I am working with is 25 rows of data in Excel where I need a macro written. The request is that the ...
0
votes
1answer
25 views

Excel Macro To Highlight Every Row Above Every Empty Row

I have an excel data sheet which is divided into data blocks of variable number of rows. Data blocks are separated from each other with an empty row. What I am in a dire need for is a macro that ...
0
votes
2answers
39 views

How can I automatically fill a series in excel, based on the value of another cell?

How do I automatically change the length of a column with the numbers 0-n, where n = a number in a certain field? I'm thinking of something like this: EDIT: Seems like I was bad at explaining ...
2
votes
0answers
18 views

Outlook macro to remove text and insert signature

(Note: I've never messed with VBA before; sorry for probably terrible code!) I'm trying to make a macro that first removes paragraphs containing specific terms (hardcoded into the macro), then sets ...
1
vote
0answers
18 views

How to use Excel 2010 VBA to set series line color, marker fill, and marker line color

I am trying to write an Excel 2010 VBA subroutine to format charts according to a predefined (i.e., defined by me) standard. The particular attributes that I want to be able to set are merely the ...
0
votes
0answers
27 views

How can i convert .xls to .csv when change is made on csv file automatically? [on hold]

How can i batch convert A.Xls to A.Csv When change is made in A.xls, for example when add 1 record in to A.xls Thanks
0
votes
0answers
17 views

Using Chart BeforeDoubleClick with a chart object in worksheet

I am trying to get a macro to work on a chart in a worksheet using the Chart.BeforeDoubleClick event. I have been able to use BeforeDoubleClick event (without the use of class modules) in a ...
1
vote
3answers
182 views

Can't click on ActiveX control in Excel 2010 Standard

I have a .xlsm file that has ActiveX control button with a module macro assigned to it. Problem is I can't click the ActiveX button from my Excel 2010 Standard. I tried to repair and reinstall Excel ...
0
votes
1answer
16 views

How To Autofill (Using VBA) Until Adjacent Cell Equals a Particular Value

I want to autofill a data validation list down in column E. However I want to stop the autofill when it reaches a particular value in an adjacent column (column B). For example, I have 50 rows in ...
0
votes
0answers
15 views

Excel unique entry duplicate sum per duplicate

I need to track the usage on my workspace. We have a Magnetic Stripe Reader that I have installed so that everyone has to badge in when they use the space. I need to figure out how to sum how many ...
0
votes
0answers
13 views

VBA to paste pipe delimited information [closed]

I have been stuck trying to write a macro to paste in copied data (from unix) that is pipe delimited into excel. Is there anyway to do this without going through the process of opening up the text ...
-2
votes
0answers
21 views

Pull data from excel worksheet using VBA [closed]

I have a workbook with two sheets. Sheet 2 contains a "database" of info: first name and last name and a record ID assigned to them. Say it looks like this: 1 john doe 2 mary smith 3 ...
0
votes
1answer
21 views

Is there a way to include “workbook” event functions in my personal macros file?

e.g. Private Sub Workbook_AfterSave(ByVal Success As Boolean) Beep End Sub This only works in "ThisWorkbook," and only in 1 spreadsheet at a time, not in my personal.xlsb file. (Inspired from ...
2
votes
1answer
28 views

Can I run a VBA function whenever excel calculates, even when I don't click F9?

This is a followup question to this one: Can I make Excel beep when a calculation is finished? The answer relies on me pressing F9. However, even with calculations on manual, sometimes calculations ...
0
votes
0answers
10 views

How to use Excel VBA API:XmlNamespace .InstallManifest [closed]

I have read the help document,but I am still confused,is there someone can help me by providing an sample example?
0
votes
0answers
11 views

When enter key is pressed, find the next instance of searched word

I have recorded the macro for the process of finding word. Whenever I hit enter button it will go to the next occurrence of searched word.How can I do it programatically using macros. When I click ...
1
vote
1answer
15 views

How to highlight multiple searched words in a document?

I have a file which has words to be searched in it. I want to highlight those words in active document. For example: style.docx: school Agro commercial abovementioned some words physics Active ...
1
vote
1answer
93 views

Populating Data Table in Word with Excel VBA: Selecting Range between two bookmarks and pasting

With Excel and Word 2013 & Windows 8: In essence, I have an excel template that I want to update to a word template. I have about 20 tables in Word, that are preformatted and I want to update ...
0
votes
0answers
13 views

Mouse Pointer Glitch when using Dual Monitors, Win 8.1, Excel 2013, and VBA, Visual Studio. Cursor Drifts

I have been using Windows 8.1 and Excel 2013 and I've been writing a lot of VB for Excel. Also I've been using Visual Studio 2013 on some projects I'm working on. I've searched for this answer and ...
2
votes
0answers
14 views

How can I sign an MS Word macro with a digital certificate from the local machine certificate store?

I am trying to find out how I can digitally sign a Microsoft Word macro using a valid 3rd party CA issued VBA code-signing certificate that is installed into the machine rather than the user ...
0
votes
0answers
18 views

Efficient removal of duplicate records across multiple Excel sheets

I have a workbook with 2 sheets. Sheet 1 has 3 columns (1A, 1B and 1C) and sheet 2 has 2 columns (2A and 2B). Now I need to delete rows from sheet 1 if 1A and 1B match any row in sheet 2 (i.e. 1A=2A ...
1
vote
0answers
10 views

MS Word Hyperlink to Files Located in Same Folder as Document

I want to setup hyperlinks in a Word document to files (jpg) that are always located in the same folder as the Word Document I want to distribute a package of the Word document plus the supporting ...
2
votes
3answers
37 views

How to compute the number of occurrences of a string in the entire workbook?

I want to compute number of times a specified string appears in my entire workbook in some column. I have tried this formula =COUNTIF(sheet1:sheetn!C2:C150; "*string*") But it renders the #VALUE! ...
5
votes
4answers
482 views

How can I record a transition from a 0 to 1 in a column in Excel?

I need to record the number of transitions from a down state (0) to up state (1) in a single column in excel and I am wondering whether there is some kind of logic like this available in Excel or ...
-3
votes
1answer
36 views

How to copy and paste “ONLY VALUES” from one workbook to another?

Can someone teach me how to copy and paste "ONLY VALUES" from one workbook to another? The workbook contains about 20 worksheets, and I don't want to copy and paste each sheet one after another into ...
1
vote
1answer
23 views

Excel 2010 : How to compute the number of non blank cells in a column among the entire workbook

Let's say I want to compute the number of non blank cells in some column (A for exemple) among the entire workbook, for a fixed range of cells. How can I do this ? knowing that for just one worksheet, ...
1
vote
0answers
35 views

MS Word 2010 - How do I create a universal macro that will auto-insert a header if none exists?

I'd like to create a macro enabled template that will automatically insert a header into a document if none exists. This is in order to work around a printing issue that cuts off the top of the ...
0
votes
1answer
37 views

VBA code not working due to syntax error

I'm new to VBA. My objective here is to create a function to show the lowest price of a steam item, given a URL. Here's the mash-up code I've put together so far. However, there seems to be a problem ...
-1
votes
1answer
40 views

Solve .CommandType=0 error in excel

I am trying to run this macro in Excel that pulls data from a website in a loop. There is one table I need to pull from each of about 50 webpages and the loop is there to run the function that pulls ...
1
vote
1answer
22 views

Outlook 2007: Is There an Event That Fires If a Rule Is Being Enabled or Disabled

I have written a bunch of macros that allow me to enable or disable a specific Outlook rule (i.e., delayed sending of messages) via a toolbar button. They also change the button's appearance to show ...
1
vote
1answer
44 views

VBA code to select the first shape in the current active paragraph

In Word 2013, I need a simple VBA code in my macro which selects the first shape that exists in the current active paragraph. Note: the shape that I need the code to select is a custom shape that I ...
1
vote
1answer
45 views

Using a loop to extract data to excel

first timer here and I'm new to Excel 2013 so if I screw up somewhere let me know! I am trying to gather stats from the Detroit Red Wings from 1932-2014 I recently learned that I can pull data from a ...
1
vote
2answers
60 views

Macro for cleaning all sheets in a workbook (VBA - Excel 2010)

I have a macro file with 5 sheets and I would like to add a VBA command button into the same file to clean all workbook contents with a single click. Does anyone know how to do it by using VBA on ...
0
votes
2answers
21 views

Why is using this code to replace a formula giving me an error?

In Excel I use the following to clear cell E5 and replace it with the word name. Sheets("Invoice").Range("E5") = "Name" I can also use the following to replace G11 with the VLOOKUP code I have here ...
0
votes
1answer
18 views

Create a spreadsheet that filters data and allows users to edit filtered data

I have a master datasheet with lots of information. I extract data from the master to a simple overview pertaining to only specific groups of people which takes this data and calculates other ...
0
votes
1answer
24 views

Macro to merge data on to template

I am attempting to basically do a mail merge in Excel. I would like to take employee data from one Excel worksheet and populate fields on an Wxcel template. So far I have written code to open the ...
0
votes
0answers
16 views

Show Excel column filter information in cells - Not working

I am on a W7 64bit pro edition, on a Lenovo T420 With regard to Show Excel column filter information in cells, is there a reason why it is not working in Excel 2003? Thanks in advance Gilberto PS I ...
0
votes
1answer
32 views

Open multiple independant instances of Word 2007

Since MS Word 2007 there seems to be a change in how Documents are opened. In older Versions, each Document could be opened in a completely independant Word Window. Now, all seem to be opened in one ...
0
votes
0answers
17 views

XL 2003 crashing on ANY VBA code in ANY class module - code module OK

Any sub in ANY class module including ThisWorkbook, an added class module, or even the worksheet class modules all crash IMMEDIATELY upon launch of XL 2003 or upon invocation via control or button. ...
0
votes
1answer
61 views

Copy Active Cell Comment in Excel into a new word file

i do not know much about Macros, is it possible someone could help me out. I have a simple excel file with names of Clients that have a lot of comments on each name. is there a fast way other than ...
1
vote
3answers
53 views

Checking whether a label exists between two other labels in a column

I have a column (call it A) in Excel lists off different items and their properties. Every item has the word "Type" associated with it and so there is a cell with that label in column A so that in ...
1
vote
1answer
30 views

Excel VBA to add cumulative total to new sheet

I am trying to create a workbook that creates a new page and puts the cumulative total from two cells to add to the new totals entered on the new page. I've been able to create a new page, but can't ...
3
votes
0answers
70 views

Excel VBA SQL Query Handles Error

I am a beginner with VBA, but try. I have SQL that I can use in Excel 2013 to get the info from the Access database and it works using the SQL directly in a connection, but now I want to run it from ...
-1
votes
2answers
36 views

Empty email content with macro

Using the thread Here I have created a macro that will open up a template in a new message window. My signature is still at the bottom though. I want to empty the email content before adding the ...
0
votes
0answers
26 views

Custom sort selection

I would like to be able to sort a selection based on the order of another range somewhere in the same workbook. While I realize I could add custom list and then sort the selection based on this, this ...
0
votes
0answers
21 views

Ideas on how to automate the export of cell values from 300 different excel workbooks

I have 300+ excel workbooks, containing some informaiton. I need to construct a dataset, containing information from each of the workbooks. To clarify, let me give you an example: -WB1.xls contains ...