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
2answers
17 views

Show timestamp when cell is changed

I need to know how to show a timestamp in a cell in column D when a cell changes in that same row in column B. I edited this screenshot in paint to show what I mean more easily: The image I have a ...
0
votes
1answer
9 views

Specifying “Where” in when inserting building blocks in MS word 10 via VBA

I'm trying to add a custom building block at the click of a button in MS word 10. Below is the code currently attached to my activeX button. Private Sub CommandButton1_Click() Dim objTemplate As ...
-1
votes
0answers
8 views

linking validation to pivot tables to create dashboard

Please can you advise why this scribt is not working on my excel 2007 but is working on another excel 2007 computer Private Sub Worksheet_Change(ByVal Target As Range) 'disable events and screen ...
0
votes
1answer
20 views

Macro in Excel to add the date in ISO-8601 format

For some reason, Excel forces me to use my region for footers when I insert the date. However, it also doesn't auto update when the worksheet opens. Without the formatting this is a rather trivial ...
0
votes
1answer
14 views

How to make a Custom List with sheet cross reference?

At the end of the month i get a excel file with a variable number of sheets. Every sheet has a value in the same cell: A1 I want to create a new sheet and display all the values of A1 on every sheet ...
0
votes
3answers
13 views

Quickly delete all floating picture in Excel sheet

I have a lot of photos in my Excel sheet. I want to delete them all - currently Ctrl-A just select all cells. How can I select all photo objects?
-1
votes
0answers
36 views

Unlock VBA Project in Word xml (a virus) [on hold]

One user in my office has received an xml file by email and opened it (with word, the default for xml). It was a virus... Now i need to know what it has done, but the VBA Project is password ...
0
votes
1answer
51 views

Word VBA: How to run Selection.Find within a pre-defined range?

I have two blocks of Word VBA code here that each work fine separately, but which I need to combine in order to obtain the desired result. One identifies a range of text (oRng), while the other runs a ...
-3
votes
0answers
41 views

Insert data between commas in a cell in CSV [on hold]

Say I have 23 names in Column A, like this: jimmy.jpg,fred.jpg,pam.jpg.brian.jpg. They are in a single cell, with a comma after each name. I need to insert 3 names between fred.jpg and pam.jpg, with ...
0
votes
0answers
14 views

Task Schedule excel file with ODBC/Oracle connection

I am having problem running an excel file with ODBC connection for Oracle to run via Windows-7 Task Scheduler. It will just say running. What the excle file does. After I open the file, it will ...
0
votes
0answers
12 views

ItemAdd and FolderAdd events with Public Folders - memory error

I have something like 1.700 Public Folders, each containing dozens of items (mails, posts, documents). I want to implement a tool that will inform each user if there is a new item added to any Public ...
0
votes
1answer
31 views

Macro to copy distinct values from one Excel sheet to another

I have an Excel workbook that has the following sheets, "Main" and "Count": Now the "Main" sheet has the column B with list of IDs. Is it possible to have a macro on "Count" page to copy all ...
0
votes
2answers
28 views

automatically Save outlook attachment

Is there a Windows-based method that can automatically pull save email attachment from a outlook 2010 to a server? I get aan email daily with an attachment that I manually save to a folder on a ...
2
votes
1answer
33 views

MySQL for EXCEL (2010) - Custom select query

I have the MySQL for Excel (MS E:2010) addin enabled (most current version). I've tested my connection to my server (non-local), and all is great, however I can't see anywhere to write / insert a ...
1
vote
2answers
13 views

Run-time error '1004';

I was trying to copy the formula from N39 up to the last row but I'm always getting a Run-time error '1004' refer to this line: n.formula = ...
0
votes
1answer
30 views

Excel Macros 2013: Is it possible to create a Macro that, with the shortcut key, formats an input value between Whole int and 2 decimal places

I am attempting to create an Excel spreadsheet which holds information of students data, currently I have rounded all data to the nearest whole int. What I wish to know is whether there is a way to ...
0
votes
4answers
36 views

Getting last cell in row with data and corresponding data in column A in Excel

I have a spreadsheet that in column A lists dates. Column B may or may not have data in each cell. The question I have is when I grab the last cell with data in column B, how can I also grab the ...
-7
votes
0answers
31 views

Need some assistance with Excel VBA [closed]

Below are two separate Excel files. I want to populate the material and thickness w.r.t part number and CPSC in the first sheet.. Can anyone please write a code for this example? Part Number CPSC ...
0
votes
2answers
37 views

Remove space before specific text excel

I have a list of 1000s of different labels and need to remove the space between the number and mg. Sometimes the space is present and other times it's not. The position of the text "mg" is not the ...
-1
votes
0answers
16 views

How do I make a recurring task on the 15th and last day of month UNLESS Sat, Sun, or Holiday?

I prefer this to be a "Recurring Task" in Outlook so that I can mark it as complete, etc. But I am open to other suggestions. Is it possible? I can do VBA coding if needed. Thanks.
0
votes
1answer
14 views

How to search a range of cells for specific txt, then copy to adjacent cell

I have a range of cells, e.g. g1-g1000 that contains two type of entries: xx.xx or xx.xxCR, where xx.xx are numbers. I want to search the range of cells for xx.xxCR and when a cell is found, copy ...
0
votes
0answers
22 views

Delineate Excel Formula Without Using Wizards

Is there a combination of excel formulas that I could use to do this without using VBA or the import wizard? I know how to insert comma delimited data from a text file and to split a cell into ...
0
votes
1answer
39 views

Copy down formula using VBA starting from different cells [closed]

I have a set of data that I add to weekly. In the data I have multiple columns that I need the formula to copy down to the bottom. I have formulas in columns (for the sample piece below) B-D and I ...
1
vote
1answer
29 views

In Excel, populate array based on table with value (and coordinates for desired array cell). All array cells are populated (default to be zero)

I am reasonably good with Excel but a near novice at VBA. I have a three column table. Column A & B have coordinates for an array, with column C having the value to be placed as defined by the ...
0
votes
0answers
23 views

Error when running a VBA in Excel

I am trying to merge 150.000 different .xls files into one only one master sheet. I have done this many times before but I am suddenly receiving a error in the middle of the process. Here is the VBA ...
2
votes
0answers
77 views

Have a different style set in different sections of the same Word document

I have a document "template" (not yet a template file type - I hope to create that as described below) for a report. The report is broken up into different sections: Letter to the Client Table of ...
0
votes
1answer
32 views

Macro to fill in cells from a column sequentially when I click on a button

I'm having a lot of trouble trying to figure this out. This is my layout: As you can see, I have 2 buttons. What I would like each button to do is: Each time I click YES, it will insert a Y ...
2
votes
1answer
53 views

Is it possible to automatically add cells from a new sheet to a formula in Excel?

I would like to make a new financial spreadsheet for tracking expenses. Since the expense sheets are created as and when I cannot pre-generate a spreadsheet to populate with formulae. I have a summary ...
0
votes
0answers
41 views

VBA: Change highlight color (RGB not wbColor) with keyboard shorcut (MS Word 2013)

I have this module in VBA assigned to a keyboard shorcut to change the color of highlight: Sub RotateHighlightwbColor() Select Case Selection.Range.HighlightColorIndex Case wdYellow ...
1
vote
0answers
49 views

How to change Control-Y behavior in Excel-VBA's IDE

Excel VBA's IDE register's a Control-y as "cut this line of code". By contrast, redo-ing is accomplished by Alt-e, R. Is there any way to change this behavior and make Control-y be the much more ...
0
votes
2answers
19 views

Can a macro be set up to hide data and images?

I was able to create a macro to hide rows, but the images wont hide. What am I missing?
0
votes
1answer
19 views

How do I create a back button in excel

I need to create a back button in excel, which allows the user to go back to the previously viewed worksheet. Not sure how to do this in VBA, any thoughts would be appreciated. Thanks, Dave.
1
vote
0answers
30 views

Excel VBA that calls Powershell ActiveDirectory cmdlet, but Module won't load?

I have a powershell script I use to dump user and computer lists to csv files; it works great and I don't want to touch it much. It uses the ActiveDirectory cmdlet, and the Get-ADComputer and ...
0
votes
1answer
49 views

Combine duplicates in Excel based on values from 2 columns, produce the sum and and % from others, remove dups

I have been struggling with my Excel report trying to roll up duplicate rows based on 2 column values. Also need to calculate the sum of the 3rd and 4th column and calculate the percentage. Here is ...
0
votes
0answers
64 views

Excel 2010 shared workbook - image buttons disabled

I have several Excel workbooks which were originally created in a 2007 version. They are shared workbooks, and contain some VBA code, and are protected to prevent users from changing certain content. ...
0
votes
1answer
45 views

Excel 2010 workbook startup error

I have an Excel workbook that causes an error when it is started on a particular PC. No other workbooks give the same error on this PC, and the workbook itself causes no problems on any other PC. The ...
1
vote
1answer
47 views

Word 2010 VBA applying styles but not changing font

I don't use VBA that often, and I'm trying to put together a macro which selects all text in the document with font size 13.5 pt and changes its style to Header 1. So far I have the below code: Sub ...
0
votes
2answers
84 views

Referencing cell only by column name in Excel 2010 VBA

In Excel 2010, I need to go through a data table row by row and manipulate the data in VBA. My original function reads like this: Private Function GetValue(ByVal myRange As Excel.Range, ByVal strCol ...
3
votes
0answers
28 views

How to create a Call Diagram for Excel macros?

I have an Excel file with multiple VBA-Macros. For documentation purposes I want to create a UML Call Diagram, or similar that represents which macro calls which other one. Is there a way to ...
0
votes
0answers
43 views

How to change the colours of sparkline axes individually

I found the following code (in the office docs) which allows me to change the axis colour of a group of sparklines: Sub AxisColor() 'The sparkline group Dim oSparkGroup As SparklineGroup ...
-1
votes
0answers
32 views

Excel Macros stopped working?

A user recently updated iTunes and, since they, they are no longer able to run macros in excel - even from the developers tools tab when selecting to execute it does not work. I'm not very familiar ...
1
vote
1answer
56 views

VBA - Populate cell if adjacent cell is not empty

I have created a macro that opens and edits excel workbooks for me. Firstly, it adds a new column A and then changes the title for A1, B1, C1, D1. After this, I want to create some sort of formula ...
1
vote
1answer
61 views

Excel VBA User Form option buttons

I've created a userform that will require an option button to be selected (thus emailing the intended recipient), otherwise it will display a msgbox. I'm having a problem with the If And Then Else ...
0
votes
2answers
105 views

Update and Append Rows based on Two Criteria in VBA Excel

Could anyone help me write a code in VBA that updates a table, or appends new data based on criteria in two columns? For example, there might be a name column, and a project column, and we want to ...
0
votes
1answer
21 views

Determining which column is visible to the right of a frozen pane in VBA

I'd like to determine in VBA which column is shown directly to the right of a frozen pane, in the example image, it would be column G. See the picture for reference. Any ideas?
-2
votes
1answer
104 views

Excel VBA copy value to new

I'm brand new to VBA and macros. I've been stumbling along rather decently, but I've come across this problem and I'm not sure how to tweak the code. I need the user to be able to enter a value ...
2
votes
4answers
2k views

Excel runtime error “32809” corrupt workbooks?

Currently facing an incomprehensible issue with Excel... We have developed a work order electronic package that is used by about one hundred users every day. It is essentially the exact same workbook ...
0
votes
1answer
21 views

How do I get URLs from hyperlinks in Excel 2010?

I have a column of cells with hyperlinks (to web addresses) and I need their URLs to be regular text. Is there a way to extract the URLs from hyperlinks? Example: Cell says: "CLICKME" Links to: ...
0
votes
0answers
32 views

Access 2007. Make each string in text box clickable?

Access 2007. Database table tblUsers, column tblUsers.fldItems. That column can contain nothing, one word or a delimited list of items (brush, comb, sprocket). In a form I have a text box ...
0
votes
1answer
29 views

Intersect ERROR:Method 'Range' of object '_Global' failed

Why A get this error: Method 'Range' of object '_Global' failed When I Put: Private Sub Workbook_SheetChange(ByVal WS As Object, ByVal Target As Range) Dim NTT As Range Set WS = ActiveSheet Set NTT = ...