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

3
votes
0answers
200 views

Why would an Excel 2010 spreadsheet with VBA lag when opened with other large excel spreadsheets already opened

I've got a relatively small (~100K) Excel 2010 spreadsheet that (via VBA) when opened, closes all worksheets except the start page, checks the user name and cross checks it with a SQL table, bringing ...
2
votes
0answers
51 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) ...
2
votes
0answers
162 views

Splitting an excel 2010 spreadsheet into multiple workbook files based on column value

I find and clean a lot of contact data, sorted by country, which I am currently using excel to manage. Mainly because it is easier to clean and manipulate the data I find this way, and I can easily ...
2
votes
0answers
859 views

How do I make Outlook 2010 print attachments automatically?

I'm trying to get Outlook 2010 to print attachments automatically apon arrival. I've found this on the internet. The VBA code is Sub LSPrint(Item As Outlook.MailItem) On Error GoTo OError ...
2
votes
0answers
241 views

Fitting images to document's margins in a docx file

I've got a docx file with many figures, all do not fit the margins of the document. I can manually adjust the sizes of the figures in the file, but would love to have some way to automate this ...
1
vote
0answers
26 views

From outlook RSS: Download attachment, rename the file and save it to a folder

I know that it should be possible but can someone give me a script to do this? At least some hints how to do it is appreciated.
1
vote
0answers
60 views

Is there a macro to filter table by some list elements?

I have a table with entries based on a list and I used a macro I found somewhere to be able to add/remove multiple elements from the list to one cell, let me show you an example: TEST TABLE test1 ...
1
vote
0answers
69 views

How can I edit this macro to loop through the results?

I am trying to select one cell to the left and to the right of a cell I have found by it's value. I am new at writing VBA macros and have hacked together the following script from a few different ...
1
vote
0answers
76 views

Incrementing ticket numbers each time I print

I have an excel sheet to print a set of 4 tickets per page which we use for stock takes. I found code that prints one number per page. Being a Visual Basic for Applications novice, I was unable to ...
1
vote
0answers
220 views

Outlook VBA script - find and replace text with image

I have a e-commerce store. When I get a sale, I receive an order confirmation email which contains the name of the product sold. When the email comes through, I would like to run a script that ...
1
vote
0answers
88 views

Pasting and re-sizing a screenshot

I often take screen shots of random drawings and i want to re-size them using a macro. I want the macro to automatically paste the screenshot then re-size it to fit to a height of 5.9 inches and a ...
1
vote
0answers
319 views

Can VBA be used to get the creation/modified date of attachment itself, not the email?

I would like to see the creation and modified dates of an Outlook attachment using VBA. No such property seems to exist. Public myAhmt As Attachment Public crDt As date crDt = myAhmt.CreationDate 'no ...
1
vote
0answers
390 views

How to change the default language for all slides in a PowerPoint presentation?

I tried the trick explained in a related discussion, but could not change the proofing language for all texts in all slides of a PowerPoint 2007 presentation. Could this be a feature of PowerPoint ...
1
vote
0answers
186 views

Runnning macro when specific text is entered on Word

How can I make a macro that does something whenever a specific text is entered on Word. Can you give me a simple example of a macro that, for instance, is run every time some text is entered between ...
1
vote
0answers
66 views

How to assign a standard email account to contacts in Microsoft Outlook

I am using Microsoft Outlook 2003 with 6 different POP3 accounts. Now I would like to define a standard account to be used for my contacts or groups of contacts, for example: When sending email to ...
1
vote
0answers
680 views

How to Search For Excel (2003) Files which Contain Macros on Server?

How can I search for Excel files that contain VBA code, are there any efficient ways to do this? The way I'm thinking of would be to use vbscript and recursively search through the directory, open ...
1
vote
0answers
100 views

Outlook 2010 Category search

I am looking for a script for Outlook 2010 Categories that will act like Evernote tags. Once you start typing in a search bar it will start displaying the categories that match. Is there something ...
1
vote
0answers
163 views

How do I connect a checkbox to include more than one cell of data?

I'm working on a matrix where you can compare products and their options to one another. I've created a macro linked to a data table in my workbook (titled portables). When you click the check boxes ...
1
vote
0answers
488 views

Switch IE9 browser mode to IE7 at runtime in VBA

I want to switch the IE9 Browser mode to IE7 programmatically in VBA at runtime. I can engage the F12 develop tools and change it manually, but I want to automate this step in my code after I have ...
1
vote
0answers
293 views

Refreshing Crystal Reports through Excel Macro

At work we have an ancient Ingress database that wont allow me to make links between tables using the SQL Query editor in Excel 2007. My current solution is to generate the data in Crystal Reports, ...
1
vote
0answers
428 views

Auto filter refuses to work in locked sheet in Excel 2010

I have a spreadsheet that is used for configuring IP phone system configurations. Bascially I have a table that has the following info in it; Part No. Description Qty Price I ...
1
vote
0answers
582 views

Excel 2010 AddPicture functionality changed?

Me again. In Excel 2003, we're using some VBA to automate adding a picture to a worksheet. The call, in a nutshell, is: Dim Pic as Object Dim filePath as String . . . Set Pic = ...
1
vote
0answers
228 views

Automate Conditional Template used in Word MailMerge

I have four different Word 2003 documents set up, all using the same Excel data source, but the documents have different logos, text, terms and columnar content layouts. Currently remLetter1.doc ...
0
votes
0answers
20 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
0answers
21 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 ...
0
votes
0answers
19 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 ...
0
votes
0answers
36 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
0answers
41 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 ...
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
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?
0
votes
0answers
54 views

How to distribute one (1) Word 2010 template file with [macros, custom ribbon tab, quick style set]

I am developing a macro enabled Word 2010 template: MyTemplate.dotm. At the moment MyTemplate.dotm is mainly containing a ribbon with callbacks to VBA-logic, "native" in MyTemplate.dotm: ...
0
votes
0answers
38 views

Excel add picture from another worksheet in comment box

I have index worksheet that is used as a table of contents that link to other sheets. I would like to show a preview of the pictures on the other sheets. I learned that the best way to do it is insert ...
0
votes
0answers
44 views

Outlook VBA not recognising Inbox subfolder

There are 3 email addresses controlled by Outlook. When an email arrives to a specific email account, a specific word in the subject line directs the email to one of 2 sub-folders: PHY2048 or PHY2049. ...
0
votes
0answers
145 views

Macro to Import CSV files into Excel

I have a bunch of CSV files in a folder. I'd like to import each file into Excel using the 'Import from Text' tool by typing the name of the file into a cell. I then need to format all of the data ...
0
votes
0answers
55 views

I'm looking to create some VBA code to search for other instances of certain string, move original instance above found

Please excuse me if I'm posting incorrectly in any way- this is my first go round on superuser. I'm looking to create a fairly basic VBA macro to automate a process in excel I'll otherwise have to ...
0
votes
0answers
37 views

MS Access Personal Macro Workbook

In MS Excel I have a personal macro workbook that is with me no matter what excel file I open. Is there a similar solution available for MS Access? The reason I am working on this is that i want to ...
0
votes
0answers
75 views

How can I create a persistent data connection from MS Project 2013 to Excel 2013?

I'm trying to get dates from an MS Project file to come across to a separate Excel file which I'm using to run conditional formulae on to handle the project status matrix. The catch is that I need ...
0
votes
0answers
78 views

how to convert data in table format to pivot format

I would need help in converting table which is in table format to a pivot format. Below is the sample data which i have: ![Input File][1] Product Currency Value US UK Japan Ind ...
0
votes
0answers
41 views

Import CSV file to XLS workbook using VB Macro

I have an excel workbook, with one main sheet called "BASE". Here there is one column where values are filled. There are two types of these values: 1) Scalar value and can be entered directly in this ...
0
votes
0answers
324 views

how to get encode type of text file using vba

I would like to check encode type of text file is UTF-8 without bom or SHIFT-JIS. Because I change to SHIFT-JIS if encode type is UTF-8 without bom. So I want to get encode type of text file. What is ...
0
votes
0answers
228 views

Fill a web form with data from excel (macro)

I am new to VBA and I am struggling to find a solution for my problem. I have an excel database with UNs and PWs for a number of profiles. I also have an administrator UN and PW and each time I want ...
0
votes
0answers
151 views

VBA Macro to sort and apply conditional formating to a range of cells with dynamic number of rows

I have a range (the image below). Please note that: Range is generated by another application, so number of rows is ever changing, and is not formatted as an Excel 'table' The number of columns, ...
0
votes
0answers
22 views

How to group data of text file using VBA

I would like to develop following flow. What is the best way of doing this? Text File(Read) AAA BBB CCC BBB CCC AAA AAA CSV File(Write) AAA, BBB, CCC
0
votes
0answers
97 views

Excel VBA Chart.Export File size too big. How to resize the exported PNG file

I have recently taken over this process where I will need to manually copy a range from an excel spreadsheet asPicture, and paste it in a email body as bitmap. This is so that the recipients of the ...
0
votes
0answers
21 views

how to toggle values and look for a lable ms Access 2010

Function ToggleLabels(ByVal lblName As String, lblStyle As Integer) Dim objL As Label objL.Name = lblName If objL.BackStyle = 0 Then objL.Caption = "" objL.BackStyle = 1 ...
0
votes
0answers
58 views

How to automate transfer of specific data in cells to another workbook in Excel

I admit to not being very technical and my limit up to now has been using paste links to connect data between sheets. I now have a requirement I cannot figure out. I have 2 workbooks I wish to ...
0
votes
0answers
36 views

how to develop to display defined button name only at OpenFileDialogBox using excel vba

I am developing Select File Process. There is no problem that open FileDialog and select File. But there is a problem dealing with button name. Although I defined button name as "Select", the time ...
0
votes
0answers
141 views

Using VBA to sort cells to match the values in an adjacent column

What I would like to do is write a macro that sorts the values in the range B3:D9 on the left side of the linked image to produce the intended result (shown on the right side). For every value in ...
0
votes
0answers
31 views

VBA Editor on F8 shows outlook insted of Step Into

Excel VBA Editor on F8 shows Outlook insted of Step Into. I don`t use it and it wants me to add my e-mail configuration every time. In other applications F8 works properly. What am I doing wrong? ...
0
votes
0answers
34 views

Excel Macro looping

I used this macro and it worked fine, but I needed a little bit more. I had to change LookAt:=xlWhole to LookAt:=xlPart and add the color formatting. Now, when I select a column, the Macro appears ...