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
0answers
5 views

How do I send auto reply to the particular person when his id is in group

How do I set auto reply to a particular person according to system date & time where the person ID should be fetched from the group ID.? For example: To: Particular person (according to sys date ...
0
votes
1answer
17 views

Excel VBA - Getting “Object Required” Error When Stating Range Is Not Null

Below is my code where I'm getting the error. I've marked the line that the error occurs on in bold (i.e. ** at the beginning and end of the line **). The specific part of the code I'm receiving ...
0
votes
1answer
15 views

Error: The Macro May Not Be Available In This Workbook Or All Macros May Be Disabled

I'm trying to adopt the solution from this post & I've modified the macro slightly (I only need to add on button click) so that it's now Sub AdjustValue() Dim btnName As String Dim ...
0
votes
0answers
13 views

Cleaning up data fetched from Google Spreadsheet to Excel

I've been trying to synchronize and build a local database with Excel data. I need to build the database and program to create user accounts, manage the packages, track and log the status of the ...
0
votes
1answer
33 views

'On Error Resume Next' not working

I have one procedure in excel vba code. In this I use 'ON ERROR ....' syntax. Procedure starts with ON ERROR RESUME NEXT to skips all error. But at some point I want to change that status from ON ...
0
votes
1answer
32 views

XML data from one Excel cell to new XML file [on hold]

In A1, A2, A3... A16000 I have the entire context of a XML in one cell. Example: The entire XML for one invoice is in A1, the next invoice in A2 and so on. How could I save the context of each ...
0
votes
2answers
45 views

Copy multiple Excel workbooks into one workbook

I am trying to copy multiple Excel workbooks into a single workbook with each of the copied workbooks to have their own Tab. I do not know how to use VB, so I have tried many VB scripts I found ...
0
votes
0answers
16 views

Copying data from a mixture of protected and unprotected workbooks in Excel

I've been given 16 productivity-tracking spreadsheets from a team, and tasked with pulling the numbers from all the sheets into one, for a 'team average' type deal. Two of the 16 workbooks are ...
0
votes
1answer
23 views

How to display unique numerical values from different columns into a single cell (separated by commas)

I have a unique problem I have been trying to tackle with no avail. I have scoured through the internet but only found partial solutions and not a complete solution. I am looking for a function (or ...
1
vote
0answers
22 views

Excel VBA Run-time error '1004': Applicated defined or object-defined error - Need code assistance

This is the code that I am having an error on in Excel: Sub Start_EndDelayInMonth() With Sheets("Analysis Worksheet") Dim i As Long Dim LastRow As Long LastRow = Range("N" & ...
0
votes
0answers
23 views

Creating a dropdown submenu in PowerPoint

I would like to know if it's possible to create a dropdown submenu in PowerPoint like the one for inserting a WordArt: If it's possible can you share with me some documentation about this?
-1
votes
0answers
23 views

How can I automate the process of printing 2 rows of data from one sheet after pasting it onto the form on another sheet?

Sheet 1 of my spreadsheet has the following form: A B C D They are just columns named 'A','B','C' and 'D'. Sheet 2 has the following data: A 1 2 3 4 5 6 7 8 9 10 I want to print pages of ...
0
votes
0answers
21 views

Replacement of a string in excel with another string, taken from a csv file [closed]

Say I have a CSV file which looks like "5.2", "Blah Blah Blah" "5.3", "Bleh" "5.4a", "Unicorns" Now, how would I go about creating a script or macro of sorts(?) so that whenever I type ...
2
votes
1answer
31 views

VBA EXcel - I am getting an error (400) if using error trap getting no object/application defined error

My excel sheet has these data, 7 columns sl.no | bed | 2| 4| 3|4|3| some times column no 7 is empty, and then only I'm getting error And my code Sub sup_cal_area_sft() Dim lru, plru As Long Dim ...
0
votes
1answer
30 views

Excel formula disappears when saving as .xls

I have a long formula in one of my cells. It is: ...
0
votes
1answer
16 views

Excel Macro to draw xyscatter plot out VBA

I am trying to create a xy plot where the x values is the time axis (column A) and the y values are in the other columns. (in the example only C and D) When I try my code from below, I get a graph ...
-1
votes
2answers
28 views

how can i make my macro toggle a sheets visibility/hide?

i have the following code that i want to toggle a sheet being visible or being hidden: Sub toggle() If Sheets("Navigation (2)").Visible = True Then ActiveWindow.SelectedSheets.Visible = False ...
0
votes
1answer
18 views

Checkout/in Excel Workbooks from SharePoint with VBA

I have found several articles and past questions in SO that help with this, but I have added a twist. I found a way to map a network drive on my PC to the SharePoint folders. If I open a workbook that ...
0
votes
1answer
28 views

VBA warning when cells selected are not equal to 5 and contiguous

My Vb macro does the following: I select 5 contiguous cells, run my macro and I get 5 static random numbers between 1 and 50; It works perfectly; I need a warning when the selected cells are not ...
2
votes
1answer
31 views

How to run a macro on a shared mailbox in Outlook 2013

I am working with my own mailbox, but also with a shared mailbox. I have a macro to automatically save attachments in e-mails which I receive, but this works only for my own mailbox and not for the ...
-1
votes
1answer
61 views

Formatting any cell referenced in a Formula [on hold]

I have two sheets, one with formulas pulling data from the second. I need to create a macro or some conditional format to highlight the cell green if the data was pulled from the second sheet. sheet ...
0
votes
0answers
14 views

Running Oracle (11g) script in VBA to extract data to Excel [closed]

We have a number of saved Oracle scripts (PL/SQL queries) that we routinely run to extract data to Excel for end users. I know its possible to convert these queries in VBA and add 'buttons' to an ...
3
votes
2answers
21 views

How to apply a macro/vba formula to more than just one cell

I have entered the follows: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$V$2" Then Range("U2") = Range("V2") * Range("O2") End If If Target.Address = "$U$2" Then ...
-1
votes
0answers
43 views

Microsoft Excel - lots of scenarios

I have an excel spreadsheet that I am using to calculate the dissociation of combustion products in the combustion chamber of an ICE to form free oxygen molecules to allow formation of nitric oxides. ...
1
vote
1answer
24 views

Keep Canceled Meetings On Your Calendar for Reference

I like to keep track of meetings even after they were cancelled. It helps me go back to review activity taken for various topics and, sometimes, explain why I didn't go to your meeting. (E.G., "There ...
0
votes
2answers
31 views

Why does my IFNA (or ISNA) not working in a VBA module?

i have the following code: Sub TestNA2() IsThisNA = Sheets("sheet1").Range("D:D").Select 'Sheets("sheet1").Range("E:E").Select Range("E2").Formula = "=IF(ISNA(D1),""Delete"","""")" ...
0
votes
1answer
30 views

How to default Macros to run from This Workbook, NOT All Open Workbooks?

We have a macro enabled workbook (ver. 2010) that many people use. A few of these people have macros in their Personal.xlsb workbook. We have a situation where the macro in the shared workbook is ...
0
votes
2answers
25 views

Autosize cell after return of function

I have an xla with a bunch of functions. Basically each of these functions perform a vertical lookup on another worksheet. Here's a basic example of one of them: Function ...
-1
votes
0answers
28 views

how to list first 10 rows of information into it's own row and then repeat for next 10 rows

I have an exported file that skews the information lines by putting them in one column. And even then, the beginning piece of information which starts with the long numbers NXMPR... are in the ...
-2
votes
1answer
24 views

Formatting for many currencies [closed]

Does anyone know a clever way to conditional format for multiple currencies? I know that I could use conditional formatting formulas and program all those in, however, I have 154 currencies to format ...
0
votes
2answers
44 views

EXCEL VBA works with F5 - but will not run automatically when cell values are changed

The VBA formula works perfect with F5 Column E cells E3:E5 have Functions that calculate to a dollar amount or $0.00. This is the formula pulling from =SUM('MEDENT Proposal - Creator'!B15*15) ...
0
votes
1answer
21 views

EXCEL automatic Tab Color change not updating

I have a formula for Automatic Tab color change that works when I manually change the cell, but it does not work when the cell is changed by a function updating it from another sheet: =SUM('MEDENT ...
0
votes
1answer
47 views

VBA Code for SUMIF statement - Need to build-in additional conditions

I'm trying to fumble my way through some VBA scripting. I found this code online that allows for a SumIf function to occur when a single condition is met. I would like to expand it to two maybe three ...
0
votes
0answers
18 views

How can I add an image as header and footer in Word template 2010

How can I add an image as header and footer in a Word 2010 template? Also, I want to allow user control on this; e.g., place a check box, which if selected, would apply header and footer otherwise ...
0
votes
0answers
41 views

EXCEL formula - Runtime Error 28

I have a VBA that works - but leads to a Run Time Error 28 after a while. Colum B3:B11 have Hide or Show from a function in them =IF(E3=0,"Hide","Show") E3:E11 has a dollar amount or 0 from another ...
0
votes
1answer
41 views

Automatically run VBA macro whenever a cell value changes

I have a macro that works perfectly - except that I have to manually run it. I cannot figure out how to have it automatically run when I change values in other cells. Sub ...
1
vote
1answer
26 views

MS word macro: how to change highlights form a specific color to another — inside the selected text?

I want to change the yellow highlights in the selected text (not in the whole document) to red highlights. This VBA does change the highlighted colors but it does not stop at the selected text (it ...
0
votes
1answer
31 views

what is an appropriate shape name as my routine does not say?

i have the following routine that i found on the net here: http://www.ozgrid.com/forum/showthread.php?t=77662 this routine isn't working cause i dont know that shape name. can anyone tell me what the ...
0
votes
2answers
24 views

Strange residue on cell with Data Validation when using Excel VBA

I'm running into an annoying bug with Excel VBA. See this screenshot. I use an Excel worksheet as a User Input form. On the form I have several places where I put Data Validation. After the user hit ...
1
vote
2answers
31 views

Convert time duration string to seconds in excel

I have a series of data that is outputted from an application in the following format. 8d 21h 33m 30s 6m 32s 1m 40s 54m 6s 11m 32s 5d 3h 34m 30s 7m 40s 19h 57m 49s 1h 36m 9s 1m ...
1
vote
1answer
35 views

Macro does not run when opening a File/Workbook from within Excel

I'm new to Macros and VBA in general but my goal is pretty simple I believe. My macro should search an opened Excel document (automatically) and create a MessageBox with a warning if the WEEKNUM() ...
0
votes
0answers
30 views

I am using VBA for Excel to automatically generate an email with a link to a specific worksheet and cell

I am using excel to automatically generate and display an email in outlook. This email contains a PDF, a link to a folder containing documents, and a link to the file the email is sent from. So far ...
0
votes
0answers
15 views

How do I add data into combo box using vba?

I want to add unique data (From MainMenuData worksheet in same workbook) into ActiveX combo box placed on sheet1. Changed ComboBox Name from Properties to ZoneDropDown. Wrote following code on ...
2
votes
1answer
34 views

Create shared library of VBA functions in Excel

At our company we have a lot of different Excel files to keep track of our projects. We would like to implement some VBA functions in these files, written by us, the IT department. We want it so that ...
1
vote
1answer
35 views

Parse Excel to xml using VBA

I have VBA code that wirtes an Excel table to an xml file (actually writing the xml file line by line, tags equal column headers). This is the code, it is quite straight forward. Sub ...
1
vote
0answers
16 views

How can I set Microsoft Word up to change any text encapsulated in `backticks` to monospace?

I wish to be able to type `simple code` in between backticks as shown, and have Word automatically change the font to some monospace variant. I am aware of alternatives such as LaTeX, but would like ...
0
votes
0answers
21 views

why does this select statement fail? it works as a macro but not as a button

i recorded a macro that selects a sheet and then a range. it works as a macro but it fails as a button, just want to know why? Private Sub CommandButton3_Click() manfix = InputBox("Enter in fixture ...
0
votes
1answer
33 views

Excel 2010 VBA click cell trigger macro to show list of values

When clicking on cell say d2 I want to show the values from j2:j6 in e2:e6. When clicking on cell d3 I want to show the values from k2:k6 in e2:e6, etc. Can someone help me? thanks
0
votes
0answers
16 views

Detect that an email is marked as read and save it

My outlook VBA code aims at doing the following: In the event of selection change (i.e. say the user clicks on a different email in the inbox) If [the previous selection was 'Unread' and became ...
0
votes
1answer
44 views

In Excel, make radio button active/inactive depending on cell value

I want to make an Excel radio button active/inactive, depending on the value of another cell. I made the following attempt: Sub test() If ActiveSheet.Cells(9, 3).Text = 3 Then ...