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

show more than 8 items in the Data Validation drop down list in Excel

I have added a simple data validation to a cell but it only displays 8 items in the dropdown. Excluding the combobox solution and probably involving some WinAPI is there a way to make the drop ...
3
votes
0answers
213 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
5 views

How do I get an event to fire when the slide changes in PowerPoint?

I already know of two supposed fixes, which I will list below, along with the reason they don't work for me. The first is to use the SlideShowNextSlide subroutine. The problem with this is that it ...
2
votes
0answers
48 views

copy data from multiple word files to excel with vba

I know this question was already asked (Copying data from multiple word docs into one excel sheet) the thing is I can't use the answer. I'm fresh to vba, but I thought I can handle it. I was wrong. I ...
2
votes
0answers
63 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 ...
2
votes
0answers
145 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
233 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
1k 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
307 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
18 views

Why doesn´t my Outlook rule work more then once?

I´ve recently migrated my email to an exchangeserver, with my previous email set as a forward to my current one. I´m using outlook 2010 and Samsung galaxy s5. First problem at hand: Some E-mails ...
1
vote
0answers
13 views

Convert HTML to Word and embed file hyperlinks as attachments.

I have some HTML files that I'm opening with Word and saving as docx files. I have some macros I run to break the links on the graphics so that they get embedded in the doc file, but I haven't figured ...
1
vote
0answers
42 views

Transferring Data Between Workbooks Based on a Value in a Specific Cell

I have created a form in Excel that moves information entered in the form to the adjacent sheet in the same workbook as well as my agents workbook at a different file path. That piece of the puzzle is ...
1
vote
0answers
70 views

Cannot use Date and Time Picker in Office 2013

Since few days I have tried to apply this ActiveX to my Excel 2013. I made small app for running reports in Excel and I need some way to pick start and end date. Easiest way to do it was Date And ...
1
vote
0answers
35 views

Weird Excel 2010 VBA Window Behaviour

If I open Excel and then open the VBA window then close it, every time I RDP to my computer, the VBA window is open again, even if I closed it before disconnecting. The next time I am sat locally to ...
1
vote
0answers
26 views

MS Word 2010 macro to renumber pages within the footer of all sections.

My problems is that I also have a divider page which originally I provided -1 in the page field to get the appropriate count. Could you please advise how I can manipulate the macro to take this back ...
1
vote
0answers
41 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
82 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
79 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
112 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
243 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
100 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
376 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
430 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
208 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
68 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
783 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
102 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
169 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
534 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
345 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
480 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
617 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
252 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
11 views

My f8 key is an lcd screen and I want a tactile button to step into a program. Is there any way to change it to another key?

My f8 key on my new laptop is an lcd screen and I want a tactile button to step into a program in a VBA build eviroment. Is there any way to change it to another key? FYI, I'm writing macros for ...
0
votes
0answers
18 views

Excel 2D-lookup on a PivotTable with changing coloumns and rows

I want to do a Vlookup on a 2D pivot table but neither the coloumns and rows of the pivot are fixed and are subject to change due to ever changing data source. How can I perform a accurate vlookup on ...
0
votes
0answers
14 views

VBA Compare columns on two diff worksheets, find in 2nd and group on 2nd worksheet

Excel 2010 Hi. I have a 6,000 line spreadsheet and need to group the lines, based on identified roll up points in another spreadsheet (150 roll up points). I want to be able to see the summary ...
0
votes
0answers
19 views

Using VBA to change criteria on a query based on a table content (in Access)

I'm relatively new to VBA in Access and need help to automatize something. I have a query with my salespeople performance month by month. I use one criteria to filter the information by salesperson. ...
0
votes
0answers
12 views

Runtime error 9:Subscript Out of Range near end of code at “Worksheets(”UserForm“).Select”

The following code is for a userform, the user having three options, one being less than 70,000 square feet, one being between 70,000 and 150,000 square feet and one greater than 150,000 square feet. ...
0
votes
0answers
23 views

VBA: how to color rows based on value in a spesific column - Coloring wrong sheet

I've been struggling with this for a while now. I need to color rows in Excel sheet 6 based on the value in column F. Everything works fine except the code is coloring the rows in Excel sheet 1! Help? ...
0
votes
0answers
18 views

How can a Macro sort dates from oldest to newest?

I'm doing account statements in a bank and I need to be able to make them fast, so I am using macros for making this process. However, there is a step that I always have to do that a macro won't let ...
0
votes
0answers
18 views

Replace multiple words in Excel sheet

Sub xLator2() Dim s1 As Worksheet, s2 As Worksheet Dim N As Long, i As Long Dim from(), too() Set s1 = Sheets("Sheet1") ' contains the data Set s2 = Sheets("Sheet2") ' contains the translation ...
0
votes
0answers
13 views

Creating an Excel Search Box which Unhides a Row

I've never done VBA before and I'm pretty sure that's the only way to achieve what I need. I have a master password list which I don't want people to see when they are looking at my computer. ...
0
votes
0answers
35 views

Forfiles SubFolders

I am hoping I can get some help here. I saw a another post similar to my problem and I figured I would give it a try. I have a Forefiles code running in Excel using VBA. The code works great on local ...
0
votes
0answers
35 views

VBA Code to update data in closed excel files within a folder by clicking a button

I have a code which works really well that updates values of closed excel files in a workbook. What I want to do is alter the code so I can create a on my worksheet where I can make y changes I ...
0
votes
0answers
5 views

How to paste clipboard text into AlternativeText of an image - Winword 2010

Using VBA, in Winword 2010; how can you paste the text contained in the Clipboard into the AlternativeText of the current selected image within a word document? Below is the code I've done, to ...
0
votes
0answers
31 views

VBA Excel: Macro working well, add-in does half of the job

I created a macro that: 1.takes the value in cell "D11" then 2.trims the value acording to some criteria, then 3.opens another workbook ans searches the trimmed value then 4.copies some info to ...
0
votes
0answers
16 views

Displaying images from database in a pivot table

I've got a table with sales data on MySql server. I can connect to it from Excel and generate a pivot table just fine. One of the fields in the table contains URL to an image of a product. Is there a ...
0
votes
0answers
43 views

Automation of solver in Excel by VBA macro code

I'm solving a 3rd degree polynomial equation, e.g., -0.003x3 +0.195x2 -1.087x -180 = 0 in Excel. I can do this by SOLVER of Excel and can find the value of x. The problem is the constant term ...
0
votes
0answers
60 views

Split Excel worksheet into multiple worksheets based on a column with VBA (Redux)

I'm rather new to VBA and I've been working with the code generously displayed and explained by Nixda: Split Excel Worksheet... My only challenge is I've been trying desperately to find a way to ...
0
votes
0answers
11 views

Word crashes when printing with cursor in table

I've been doing some VBA in word to create reports and certifications. These docs include tables. I need to print my docs, but when I try, Word crashes. I find out that if the cursor is inside a ...