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

Selecting random entries from lists in Excel with VBA

In Column A, I have n number of names. In Column B, I have n number of Order numbers for each name. In one cell I will be inputting the number of orders I want to pick randomly. Once I input the ...
0
votes
0answers
5 views

Date FileDateTime in sharepoint

Sub Test() myURL = "http://sps.ap.emersonprocess.com/sg/pssops/svcops/APServicePortal/ChartTemplates/ Filename = "IBS-CCR-AP_Prod.xlsx" myURL = Replace(myURL, "http:", "") myURL = Replace(myURL, "/", ...
1
vote
1answer
15 views

EXCEL - How to use two cells for input and output at the same time

I have 3 cells, VALUE, DOWNPAYMENT, DOWNPAYMENT %. The 3rd cell "DOWNPAYMENT %" calculates the percentage of "DOWNPAYMENT" over "VALUE" Is there a way for the user to have the function to input a ...
-1
votes
0answers
7 views

Word VBA to insert Relative Hyperlinks [on hold]

I'm looking for VBA macro to do the following: Search a document identified as CM1010 and find the following three types of document references to insert a relative hyperlinks for the following: ...
0
votes
0answers
19 views

Split Text String VBA [on hold]

I need to split some text in Excel. I need to split the data but I cannot just use white space because I do not want to split some of the data (e.g., name and address). Is there a way to split based ...
0
votes
0answers
11 views

Update links to another excel workbooks

I have a excel work books that I use VBA programmed macros to open serval another workbooks (WB's). In the main WB I have a lot fomulas that is linked to the another WB's. After open all files, I ...
0
votes
2answers
25 views

MS Access 2010 maximum number of records

I have VBA program written in Access 2010. It creates and populates a table from a text file. Previously, there have been less than 20,000 records total. With the current data set, I get an ...
0
votes
0answers
7 views

Which ODBC connection properties have higher priority ?

I take data from PostgreSQL via ODBC and put the data in excel worksheet. For this I use VBA which makes a query table. In the VBA script I specify a connection string which contains some ODBC ...
-2
votes
0answers
17 views

VBA script to delete website url from message body in outlook [on hold]

i just need to delete certain urls from emails before forwarding them. Anybody knows what script should i use? Any help is much appreciated.
0
votes
1answer
50 views

How to control excel cells together with vba script?

In the userform there are product names (combobox) , prices , amount (textbox). For product name control I use with combobox . I write amount of product to my textbox as a manuel when I choose the ...
1
vote
1answer
76 views

How to add photos to specific cells in my Excel worksheet from my computer?

This is the code which I used : Private Sub Image1_Click() Range("C1").Select Application.Dialogs(xlDialogInsertPicture).Show End Sub Private Sub Image2_Click() Range("D1").Select ...
0
votes
0answers
22 views

Import/export conditional formatting rules in Excel 2013

Is there a way to import/export conditional formatting rules in Excel 2013? Possibly using VBA?
0
votes
0answers
15 views

using excel vba to copy range of cell from another worksheet to another worksheet [closed]

I have worksheet which contains values coming from a datasource which means the values are dynamically changing based on the period we selected.I want to copy these data to another worksheet for the ...
1
vote
3answers
24 views

Splitting Data in Excel Based on Character Location

I have a column of data, each row containing a set of 83 characters (e.g. 010203 344345 929348238482abcde33 4566) with no particular pattern that needs to be split into blocks of different lengths ...
-2
votes
0answers
14 views

Excel 2007 VBA help requested for counting Yes/No

I hope someone can help me with this problem I have? I have a text files that contain multiple columns. Two of the columns I have analyse the results of. My issue is that these two columns vary in ...
0
votes
2answers
42 views

excel vba codes user form

I have created a user form for my work book. I would like the user to navigate their way around the workbook using the button on this user form. Is there any code that I can use to limit the user by ...
1
vote
1answer
41 views

excel vba userform/button coding

I have created a workbook in Excel. To navigate I have inserted a userform. I have code which takes me to a spreadsheet once a button is clicked on the userform. Now I would like a button on the ...
0
votes
0answers
15 views

How to have excel 2007 userform stay on top of all other windows

The title says it all really. I have a modeless form generated in excel 2007 that'd ideally stay on top of all other windows (not just excel). I know other applications can set this, but I'm unsure ...
2
votes
1answer
41 views

Excel sheet with list of servers and links to different Remote Desktops

I have found some code to execute Remote Desktop from Excel, Sub RDP() Dim RetVal As Variant RetVal = Shell("c:\WIndows\System32\mstsc.exe " & Range("A1"), 1) End Sub I have many ...
0
votes
1answer
65 views

How do I create VBA code to extract certain columns of data from excel file? [on hold]

I have a data file that has 600 columns and 14,000 rows of data. I am working on creating an excel GUI that lets you reduce this data to only the parameters you need. The parameters (headers) are in ...
1
vote
2answers
55 views

Chart macro displaying incorrect labels from non-sequential visible rows on filtered worksheet

This macro displays text labels from the source worksheet when double-clicking a dot on a scatterplot chart. The chart is updated when the source worksheet is filtered on any of several columns. The ...
0
votes
0answers
31 views

Update to: Macro to merge cells in a column if the same rows are merged in a different column

I have a large (over 10k rows) spreadsheet with text data I want to concatenate from multiple rows into a single row. The text data corresponds to a date that is in a merged cell in a neighboring ...
0
votes
0answers
15 views

Microsoft Powerpivot button not working

Hoping someone can assist me with this strange Powerpivot issue; I have a single workbook which is not working with Powerpivot. It has a substantial amount of VBA code (much of which is related to ...
0
votes
1answer
21 views

Outlook 2010 oft template Item_Send not firing

I have written a very simple Item_Send handler for an outlook mail message template stored as an oft file that I run via a Macro: Function Item_Send() MsgBox "hello" Item_Send = False End ...
-1
votes
2answers
35 views

Creating NEW files and folders

Sub Test() Dim myDir As String Dim Folder1 As String StartDate = DateValue("2-Nov-2014") NumberOfDays = 1 For N = 0 To NumberOfDays - 1 Folder1 = UCase(Format(StartDate + N, "MMM YYYY")) Folder2 = ...
1
vote
2answers
44 views

How can I make a Msgbox pop up over other application?

I have an Excel macro that deals with thousands of lines in several tables and do some copy/paste/analyze/combine... operations. it takes almost 10minutes to run it fully. I added a MsgBox "Job Done" ...
0
votes
1answer
54 views

How to create an Excel Macro that works with any Excel workbook on my computer?

I want to create a macro and save it in a way so that it would be used by any Excel workbook I open on my computer. Is there a way to do this?
2
votes
1answer
65 views

Application and Object Defined Runtime Error 1004 - using for loops to populate Cells(x, y)

I'm using the below code to try and find the intersect of Var1 and Var2, and populate the value into my userform that I'm running. I have no problem finding the intersect, but every time I try and ...
-1
votes
0answers
18 views

custom outlook reminder addin or VBA [duplicate]

I cannot count how many times I missed my meetings appointment because I Was so deep into my programming work. I wonder if anyone has a quick/easy solution where it will halt my entire monitor red (or ...
-2
votes
2answers
101 views

How to have a value from one Excel sheet propagate to other sheets, while being incremented?

I have an Excel workbook, which has 100 sheets in it, all the sheets are identical apart from A10 in every sheet. In A10 of sheet 1 there is a value 101 which I typed in manually and A10 of all other ...
-6
votes
2answers
72 views

How to do simple math in Excel VBA

I have a value in any cell which is greater than 60. For my purpose, I need to subtract 60 from such values until the value is less than 60. So, for example, say I have a cell containing a value of ...
2
votes
1answer
51 views

Word macro to change page color

I am attempting to create a Word macro (Microsoft Word Professional 10) to change the page background color. I began by recording the keystrokes - this is the recorded macro: --- Sub WritingLayout() ...
1
vote
1answer
51 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
62 views

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

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
60 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 ...
0
votes
1answer
36 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
50 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
47 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
1answer
165 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 ...
1
vote
1answer
49 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
2answers
3k 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
50 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
1answer
24 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
37 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
17 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
26 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
291 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
42 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
31 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
1answer
69 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 ...