VBA stands for Visual Basic for Applications, a subset of Visual Basic used in all Microsoft Office Applications. Consider tagging your question with the application as well as [VBA]

learn more… | top users | synonyms

0
votes
0answers
20 views

Import CSV file in excel each in a different file

every week I get 120 new CSV-files. I need to put these in a data select template ( al the formula's are on sheet 2). So in want to put csvfile 1 in sheet 1 in the data select template. afterwards ...
0
votes
0answers
17 views

Excel calculation uses an unlikely high amount of RAM does not release it

I have a sheet that contains about 30 matrix formulas, which are calculating with about 5000 rows of data. When I calculate the worksheet manually, RAM usage rises from about 400 MB (idle) to 2.5 ...
1
vote
1answer
11 views

How to get reference to the only datatable in the active sheet

I am adding a new row to the table I have in the active sheet using the following method: ActiveSheet.ListObjects("MyDataTable1").ListRows.Add(AlwaysInsert:=True) The problem is that it is ...
0
votes
0answers
12 views

Automatically sorting a range of cells after one cell within the range has been modified?

I have a number of named vertical ranges on a spreadsheet, containing lists of names. New names are usually manually added at the very end of each list. Obviously, this means that unless manually ...
0
votes
0answers
23 views

How do I Mail Merge from a SQL DB to Word 2013 with a date filter?

I have a SQL database view that returns the data I need for my mail merge. This data needs to be filtered by a Date Range. i.e. >1/1/2014 and <3/1/2014 I have attempted to put it in the filter ...
0
votes
0answers
7 views

I need to populate a text box with the value from one of two other text boxes based upon the selection made in a DropDown box

The DropDown box has three values: "None" "1st Lien Position" "2nd Lien Position" There are two other text boxes containing the values I need to copy into a third text box: Textbox 1: ...
2
votes
0answers
9 views

Excel VBA not working when “enable editing”

I'm not sure if this is the right place to post this but I'm having issues with excel VBA. I sent a worksheet with custom VBA attached to an email. Once the user downloads the file, it open in excel ...
0
votes
1answer
6 views

Load a picture from one inserted ActiveX Image to another - VBA Excel

I got a set of named pictures on an Excel sheet, created by the "Insert" button in development tag, and from the section "ActiveX controls" from the "Insert" button. What I want is, when I click on ...
2
votes
3answers
35 views

Custom user function without using VBA

Is it possible to create a custom user function in Excel without using VBA? My problem is I have a long string of standard excel functions strung together to make one very long function. This function ...
0
votes
0answers
9 views

I have an error 3223 err.number access microsoft [closed]

I have an error 3223 err.number access microsoft while executing "DoCmd.OpenReport" The error message is '[DalğaBlablabla].[Blablabla].[Blablabla....' is invalid because it is too long, or contain ...
0
votes
1answer
34 views

How to implement conditional border formatting in Excel?

I need to force cells B, C, D, E to have an upper border IFF cell A is not empty. How can I do this ?
1
vote
1answer
32 views

When using multiple accounts, how to ensure emails are sent from the correct account

I use 2 email accounts with Outlook. One for work, one for personal. The problem I have is I am forever sending work emails from my personal account! How do I set up a list of "do not send email to ...
0
votes
2answers
36 views

How can I find out which parts of an Excel workbook are the biggest in size?

I have an Excel .xlsx that weights 47MB. I'd like to know which parts of the workbook are the heaviest and work them, since I haven't made much progress manually trying to identify and reduce the ...
0
votes
1answer
21 views

Removes rows (based on condition) and copy cells (based on condition)

I have to modify a huge VBA script, I am new to VBA and I must also say that I am not loving it :( I need some help writing an efficient For-loop, let me explain with an example. During the first ...
0
votes
2answers
23 views

Assign triggered code to multiple images - Excel VBA

I wanted to assign some specific actions when clicking on one of the images I have inserted in my Excel sheet. The problem is, I got 52 images (Poker cards for those wondering). So, my question is, is ...
0
votes
0answers
21 views

Export sheets and defined range to PDF

I'm trying to select these sheets in my project: Forside, Begrundelse, handelspris, dokumentation. In my dokumentation-sheet is a range defined in pages and I don't know how to add the defined page ...
0
votes
1answer
28 views

Merge Multiple Excel File

I need to merge a few hundred Excel files into in one Excel file. Each Excel file needs to be merged into its own worksheet in the workbook and the worksheet it's merged to needs to be have the name ...
0
votes
1answer
12 views

Identify Image in Excel - VBA

I have an Excel sheet, and I want to create some macros using VBA. Specifically, I want to change an image with a predefined one, every time I press a button or every time I press on an image. ...
1
vote
1answer
44 views

Getting the index entries of a Word document in VBA

I have a collection of Word docx files in various subfolders. I need to create an index file with links back to the original files. I thought that VBA might be the easiest way to do this. I can find a ...
1
vote
2answers
43 views

Align Secondary Axis Origin with Primary

I am interested in aligning my secondary axis such that it lines up exactly with my primary axis. To be more clear, I want the origins to both line up at 0 at the same place, each preserving their ...
0
votes
0answers
25 views

How do I really enable events in Word VBA?

I've found the instructions to enable events, but this does not always work. When I create a new document from a template events are not enabled. I've got the class module to have word run with ...
1
vote
1answer
22 views

How do I access a new document in vba?

I made a .dot template with a few macros. However, when I create a new document based on the template I run into trouble. If I reference activedocument, I get the message that no document is open. So ...
-4
votes
1answer
53 views

VBA for “IF formula” with multiple results in a single cell [closed]

How can I convert this to VBA? Using this formula, it cover 6 rows only and the formula is already too long. My report has 600 rows. =IF(AND('Risk & Issue Log'!$K$2=$D5,'Risk & Issue ...
0
votes
0answers
21 views

Convert OO4 ODS to XLSX using Excel 2010 VBA

I am trying to bulk convert OpenOffice documents to Microsoft Office. Using built-in VBA, I use the following code (ODS to XLSX is shown, but same code is being used for ODT and ODP with some ...
-1
votes
1answer
19 views

Format of Row in VBA based on 1stCell and also Compare to above row?

I was wondering how would i through VBA conditionally format the whole row or a row in a range based on the first cell in that row? Also it would require a comparison to the previous row to current ...
0
votes
0answers
37 views

How do I set spacing between paragraphs while keeping numbering in word vba?

I'm trying to write a macro that does the following to a selection: Keeps paragraphs that are numbered numbered Keeps paragraphs that are unnumbered unnumbered Sets line and paragraph spacing Puts ...
0
votes
3answers
36 views

Are there events defined in the word vba object model for these events?

First of all, I did look and did not find any. I want a macro to run whenever one of the following happens: The document is opened The document is saved Text is pasted into the document The ...
0
votes
0answers
48 views

Excel test generator inserts extra data. VBA

I build a random test generator for Excel using VBA. It will randomly pull questions from a test question bank. It will also add the answers in a different cell. However, I found that occasionally ...
1
vote
1answer
37 views

Searching the string in a text sitting on 1 coulmn

I'm very new into VBA coding, I would like to have some assistance as I have been trying for two days, I have got data fixed in column A, I would like to search for a string in that column, eg ...
2
votes
0answers
53 views

How do I replace all breaks in a selection in Word using VBA?

I've got a part of a document selected, and now I want to replace all manual page and section breaks (the latter of all types, such as next page even, next page uneven, next page, continuous, column) ...
0
votes
1answer
56 views

How do I select text between two “bookmarks” in Word VBA?

Note: Originally I asked how to select text from a certain point downward, but I've got a solution for that: Dim f As Word.Field For Each f In ActiveDocument.Fields If f.Type = wdFieldAddin And ...
0
votes
0answers
18 views

Macro for hiding table colums, in multipile files, and another on to reverse it

I know almost anything about VBA so I can't really code the Macro that I need for MS Word. I hope that I could get some help here. The basic functionality that I want is to take a Word document with ...
0
votes
1answer
40 views

Excel - How can I highlight duplicate cells in near-matching worksheets?

I'm running a March Madness bracket tournament using Excel spreadsheets. I have one sheet where I will input the actual winners. I have an additional sheet per participant that is near-identical, only ...
0
votes
1answer
37 views

New instance of Excel does not see already opened instance

I have Avizo.xlt with one Worksheet and a code which intended to put this WS inside already opened document, which is SLK report made by our ancient ERP system, and close this document. Everything ...
0
votes
0answers
9 views

Change font of cell automatically without changing font of text already placed in the cell - Excel 2010

I would like to be able to have the font automatically change color when double clicking on the cell without changing the font of the text that is already in the cell. Is that possible?
1
vote
1answer
32 views

How to remove “no cents” when spelling out cents less dollar figures in Excel?

Currently, I am spelling out dollar values using a module from the Microsoft support website. Here is the link http://support.microsoft.com/KB/213360 I am able to spell out dollar values in Excel ...
0
votes
1answer
38 views

Is this possible in Excel? (VBA)

I want to create a VBA macro that will do the following: The Excel file with the Macro should only open when the file is opened from a certain folder in the Windows directory. If it is not opened ...
0
votes
1answer
99 views

Show or hide rows in an excel sheet subject to the value of a particular cell (excel 2007 & Windows 7)

I have made a spreadsheet to specify decoration selections from a range of standard options. There are five separate ranges so this is the first selection then within each range there are additional ...
0
votes
1answer
45 views

How to Replace Words With VBScript Regex and VBA?

what is vbscript syntax for .net: \b[a-z]+\b Hi trying to replace all alpha words in the source. .net regex tester confirms this pattern will find all words: \b[a-z]+\b this: ...
0
votes
1answer
51 views

VBA Excel: Sub procedure to change caption in a UserForm control

I'm creating a user form that shows the value(numeric) of the last used cell in a column. I'm just guessing on how to do it but it doesn't work, this is what I got: Sub show() UserForm1.show ...
0
votes
1answer
99 views

Call PowerShell script from Excel

Excel 2010 I'm trying to call a PowerShell script from a macro in Excel. I have seen a number of examples along the lines of: retval = Shell("powershell ""C:\MyTest.ps1""", 1) When I try to use this, ...
0
votes
1answer
28 views

Autoforward Outlook emails to external only under certain circumstances

Is there a modification that can be made to the VBA code provided in this response from an earlier post that would only forward email from a certain email address rather than forwarding everything? ...
0
votes
1answer
49 views

Can Excel's Find formula have multiple find_text criteria?

I have a list of names on a NAMES tab range A1:A100. On another tab 'Data Export', in column A I have an export of thousands of comments where one of those names from the NAME tab can be found within ...
0
votes
1answer
36 views

How to combine several excel workbooks into a single book

I have several, multi-sheet workbooks which I would like to combine so that I can search them all simultaneously. So, the merged workbook will contain tabs 1,2,3, of the first workbook, then tabs ...
0
votes
1answer
94 views

VBA Excel: Function to find a string in another workbook

I'm trying to create a function that searches a string (bom) in two different workbooks and returns a value next to that string. I know the ranges in those workbooks where I want to perform the ...
1
vote
1answer
38 views

How to know which macro is assigned to a certain toolbar button in Word 2003

I have a Word 2003 toolbar made by someone else long time ago. The toolbar contains lots of buttons and assigned macros. Until now I have been able to set breakpoints in the VBA code in order to ...
0
votes
1answer
31 views

Adding two numbers using macros failed to execute

How to add 2 numbers using macros? I tried below but i am not able to execute. Sub auto_open() n1 = InputBox("enter fiest number") n2 = InputBox("Enter 2nd number") ...
0
votes
1answer
35 views

Passing an element name using a variable in VBA

I have a multi page element on a MS Access form and I am trying to use GetArgs to identify which page to open using the below code. Dim WrdArray() As String If Not IsNull(Me.OpenArgs) Then ...
0
votes
1answer
50 views

How to create a custom “Shapes” menu in Powerpoint

By the "Shapes Menu," I mean the menu that you get to from the ribbon by going to Home -> Shapes. I would like to either: Choose my own shapes for within the Shapes menu, including changing the ...
0
votes
1answer
52 views

VBA Excel: How to select only numeric values in a range?

I used Range.Find to locate a string called "Qty", now I want to select all the numbers in that column. I would use .End(xlDown) to get the last row, however the last used cell in that column is not ...