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

0
votes
1answer
11 views

How to open a particular form from another worksheet

I have two Excel files (A&B) which have more than two forms and I need to open a particular form from file B by clicking a button from file A. As of now I'm opening file B by clicking a button ...
0
votes
1answer
12 views

Access Autofilter listing with VBA

How can I access the unique listing of values in the column that the autofilter displays with VBA? I already know how to turn the autofilters on and off with VBA. I can access filters that the user ...
1
vote
1answer
13 views

Chart Series name referencing cell address Excel 2010 VBA

I am using Excel 2010. I have a XY scatter chart built and formatted the way I like. I reuse this chart many times, so I just copy and paste the chart into a new worksheet containing the new data ...
0
votes
2answers
54 views

Excel: transforming an indexed sheet with many columns to two columns

I have an excel sheet with rows like this: Fruit | Apple | Banana | Grape | Peach Vegetable | Cabbage| Lettuce| Carrot| and would like a two column output duplicating the index (first column): ...
2
votes
2answers
21 views

How to search for text from back to front

Backstory: I am copying and pasting search results from a website into word. the pasted text looks something like the image below: Goal: I only want two lines from each set of search results ...
0
votes
1answer
13 views

VBA - auto-populate date when data entered in cell

I have a tracking spreadsheet where I'd like the date a cell is completed to auto-populate in the next column. I found the following code which works for the first (I:I), but I'd like to add the same ...
0
votes
1answer
24 views

Excel 2010 Macro to Find & Replace

I have multiple work sheets in one work book. The work sheets i'm concerned with are WD, Hit, Sam, Sea, and Max. Each page uses the same exact template, so everything should match up... Here's the ...
0
votes
1answer
19 views

Is it possible to have Excel's Solver reference cells in multiple sheets using VBA?

I have seen this question posted on other forums, but I don't believe it has come up here. I would like the button I assign to a Solver macro to be located in a different sheet than Solver's target ...
0
votes
0answers
10 views

Excel 2007 Consolidate rows multiple ranges on multiple sheets where a Cell is not “” [on hold]

I am in need of some VBA code: I have 5 worksheets which I wish to consolidate into a Summary/Master sheet. The 5 worksheets have the same number of rows and columns but there are subheadings on ...
2
votes
1answer
31 views

Looping through master sheet and filter out rows that are needed

I have created a script which I want to allow a user to select a file (Master File) and if a condition is a met I want to Copy the data to the excel workbook (which the script is run on) The code ...
0
votes
0answers
19 views

I want to hide rows in Excel 2010 using VBA if a cell value is blank

I can get the VBA to work just fine to do this, but my spreadsheet is 20MB without data. What I want to do is find the first time a cell is blank and then hide every row at once from that spot until ...
1
vote
1answer
11 views

Inserting formula through VBA in “A1” reference style

I insert this formula through VBA, Cells(1, 1).FormulaR1C1 = "=LEFT(A2;5)" But the formula which gets inserted ends up with apostrophes. =LEFT('A2';5) This works perfectly with the R1C1 ...
0
votes
1answer
33 views

How to make a macro universally usable on multiple workstations with different usernames

I have a macro that I built for a specific work related task. I share this macro with a few people by sending them the .xlam file as an addin. No problems there. My problem is that some of the code ...
0
votes
0answers
19 views

How to disable 'This workbooks contains one or more links that cannot be updated' popup on open

When opening a sheet I get this popup, how to suppress it completely on sheet basis, not machine basis? I never want to see it no matter whats the status of the links.
0
votes
0answers
11 views

Copy Blank Count

i want to copy the blank color count under Color column from "5-Jul-15" sheet and "6-Jul-15" sheet to ABC sheet under "5-Jul-15" and "6-Jul-15" column (i.e. C13 and E13) respectively. It should ...
1
vote
3answers
30 views

Word macro referencing Excel worked in Office 2007 but fails in 2010

I created a VBA macro in Word 2007 that determines if Excel and a specific Excel workbook is open, opens the workbook (and Excel if needed), then performs various tasks in the workbook. Under ...
0
votes
1answer
40 views

How to Highlight entire row of a Table using Excel VBA

I'm using a UserForm, to enter data into a worksheet. I'd like to use a Checkbox to highlight the entire row of a table. Example code: Private Sub AddModifyAtRow(ByVal lRow As Long) cIndex = 0 If ...
0
votes
0answers
20 views

How to customize the Ribbon in MS Office 2013 (retaining user defined keyboard shortcuts)

I want to customize the ribbon in MS Office 2013 to have my user defined VBA macros available quickly with short and easy to remember keyboard shortcuts. While it is possible to create new ribbon ...
0
votes
2answers
24 views

Counting number of each item assigned to customer with unlabelled columns

I have a table in Excel as follows: 1 2 3 4 5 6 7 Customer1 Z U A C D A A Customer2 B D J S F D B Customer3 S A C A A B B Customer4 X H A C D A A ...
2
votes
0answers
32 views

Outlook VBA Macro to Create and Forward Email With Images in Body [migrated]

I'm a total VBA noob and I'm trying to create an Outlook macro that will copy the body of an email and put it into a template before the user can forward it. My problem is that in the email that the ...
0
votes
0answers
18 views

Google spreadsheet count words [migrated]

I have spreadsheet: https://docs.google.com/spreadsheets/d/19GrXAFLpv6jz9OzDum-fyfP_m-RZFCNrQ0rr1vd5bYI/edit?usp=sharing I want to count percent of wins(W) in G column and write it to G1 cell. I plan ...
2
votes
1answer
44 views

Use Excel to match data from a cell on a worksheet, then copy data from its neighboring column and paste on a different worksheet

I have a spreadsheet with multiple names and phone numbers next to them in each Sheet 1 - Sheet 5. Each Sheet has about 900 names on column A and their associated phone numbers next to them on column ...
1
vote
0answers
14 views

How can I use Word to add inline styles to text as I type? [closed]

I don't want to select the text and style it, I want a combination of autocorrect and a macro so that I can type ">>> " and turn my style on (removing the ">>> " as well), then type " <<<" ...
0
votes
1answer
26 views

In excel how could I generate a row of data from another sheet?

In excel I have a sheet named "sales", and another one named "factor". In factor I have some fields for factor ID, customer name, product code, quantities and price. I want when I add this data to ...
0
votes
0answers
31 views

Excel 2013 - Not Responding and crashing while stepping through VBA macro- Win7-64 I7 processor [on hold]

I am getting a consistent problem whereby, while stepping through a macro (or running it) Excel 2013 gives me a NOT RESPONDING message and essentially crashes; i.e.- I have to close the app. This has ...
1
vote
1answer
49 views

Outlook 2013 - VBA - reply in line

I have written a small script to automatically select the first autocorrect option. It works when, in 2013, I write a new email or "pop out" an email. However - it does not work when I reply "in line" ...
0
votes
1answer
18 views

Upgrade from MS Outlook 2003 to MS Outlook 2013 - how to migrate custom views and menu bars?

I'm currently working with Microsoft Outlook 2003 and want to upgrade to MS Outlook 2013``. I have made some modifications which ware important for my work and I wonder what is the easiest way to get ...
0
votes
0answers
4 views

Outlook Rule run script open email in IE

Does anyone know of way to have a client side rule in Outlook 2010 that would open an email in Internet Explorer rather than in Outlook when double clicked?
0
votes
1answer
20 views

Deleting all cells in row after blank space

I was just wondering if there is a simple way to, for each row, move right and check if there's a blank cell and if so delete everything to the right of it. Can this be done with a formula?
0
votes
0answers
137 views

Changes not stored: MS Word Find and replace: italics --> all caps

Inside MS Word, I record a macro which does a bunch of find and replaces. One of which is find-->font-->italics and replace-->All Caps i.e Hello ---> HELLO When I do this, the ...
0
votes
1answer
21 views

Retrieve data from Tuleap OpenALM to excel using VBA

I am trying to access Tuleap Open ALM via REST API. I used the /api/explorer/ to get necessary URL: "https://openalm.mycompany.com/api/v1/users?query=asmith&limit=10" and I get correct output: ...
1
vote
1answer
40 views

vba macro - find first blank column from specific row range

Most of the solutions I have googled were either about finding the first blank column or first blank row, but I specifically need to find the first blank column in a range of rows. What I need is to ...
-1
votes
0answers
40 views

How can i add numbers using sum function in vba between ranges

I am trying add sum function between two ranges E and H. So i used This code below but kept on getting wrong numbers, its not working or not adding right.... Function expenz () As Double Dim a ...
1
vote
2answers
33 views

Bypass Excel file selection confirmation for data connection with non-.txt text file

I have an Excel workbook that processes model output from another program. That program produces space-delimited plain-text output files with a ".plt" extension. I have a data connection in Excel to ...
0
votes
1answer
33 views

Concatenate two columns, look for duplicates copy single row to new worksheet

I have an Excel or CSV file with 5,000 rows and 20 columns. I want to concatenate Column 6 and Column 8, look for duplicates and then copy only one of the duplicates into WorkSheet2. For Example: ...
-2
votes
1answer
24 views

command button creation with vba

What is the vba code to add a command button on currentworksheet, then insert a code to run whenever that button is clicked? advance thanks. Note: the task for the command button click is : select ...
0
votes
1answer
24 views

How can i use multiple cells in range method in vba

I am trying to set up two range in cells method. I am trying to select E and G so i was using. ActiveSheet.Range ("D" & ActiveCell.Row & ":G" & ActiveCell.Row) Kept on getting an ...
2
votes
1answer
27 views

Transforming Color Codes in VBA

I have a bunch of code in excel macro which includes following pattern ; Sheet1.Cells(i, 1).Interior.ColorIndex = 4 Sheet1.Cells(j, 1).Interior.ColorIndex = 4 As you see, I'm painting some cells ...
0
votes
0answers
34 views

vba macro - assign value of cell from another workbook to a variable

I have workbook that have this button. And I also have another workbook that contains some values. I have the code below to open the said workbook and then assign the value of some cell there to a ...
2
votes
0answers
40 views

Excel “Smart” Dropdown / Data Validation

In Excel, is there a way to create a dropdown menu or data validation field that Allows the user to enter a value that is not currently on the list (like a combo box) Save that value in the dropdown ...
3
votes
2answers
92 views

Can I customise the new Timeline slicer in Excel 2013?

Excel 2013 introduces timeline slicers for the first time. These allow you to filter pivot tables easily by selecting time ranges - either by year, quarter, month or day. It's nearly a useful tool, ...
0
votes
1answer
20 views

Timestamp Macro switched to different time source

I have a timestamp macro that gives the current date and time at the point in which it is ran. I also have two cells that show the Stock Exchange Date and time. I need the timestamp macro to return ...
0
votes
0answers
33 views

How can i sort data with macro in different worksheet?

I use the following code for sorting a sheet in a workbook with a macro but when I open another workbook, it doesn't work. How I can I change the code so it can run in another workbook as well using ...
0
votes
0answers
35 views

Manipulating excel file from command line

I have written a Python script that generates an excel report file with some data. Then this file is automatically sent to a list of recipients. What I'd like to do though is to make the excel report ...
0
votes
1answer
54 views

VBA- Copy and paste error 1004

I was doing a code for vba and wondering why I received a runtime error 1004 when attempting to paste in sheets "Datasheet". It tells me the information cannot be pasted as the copy area and paste ...
0
votes
1answer
31 views

How can i create click function between A1 to A10 prompt inputbox for user to enter numbers in vba

I am trying to create input box for selecting range (A1 to A10), every time when i click any cells between 1 to 10, i want to prompt input box to enter numbers. That's what i did but it's not working ...
0
votes
2answers
15 views

How to set up lastrow selecting range in vba

Trying to set up last-row between ("B4:B17") and kept on getting an error(APPLICATION DEFINE OR OBJECT DEFINE ERROR), is there any other way i can set up last-row selecting range or what i am doing ...
0
votes
0answers
38 views

Replace text with images in Word using VBA and avoid dialog box

I've been trying to replace specific text with a related image, but cannot stop the 'word reached end of doc, start at beginning' (press OK to keep code going) from coming up, despite Find.Wrap = ...
-1
votes
1answer
77 views

Visual Basic and Excel data streaming in real time [closed]

I'm currently working on a program that runs in visual basic (not VBA). The program collects data from sensors and produces a data file (*.csv) of the information it collected after a certain stretch ...
1
vote
1answer
42 views

Copying cells to another sheet and inserting rows for the copied cells

I am trying to create a sub that copies information from one form (which has four cells) to another sheet. When it copies the information it also creates a new row. Each form has a maximum of ten ...