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

3
votes
0answers
24 views

How to create a Call Diagram for Excel macros?

I have an Excel file with multiple VBA-Macros. For documentation purposes I want to create a UML Call Diagram, or similar that represents which macro calls which other one. Is there a way to ...
3
votes
0answers
176 views

Excel VBA SQL Query Handles Error

I am a beginner with VBA, but try. I have SQL that I can use in Excel 2013 to get the info from the Access database and it works using the SQL directly in a connection, but now I want to run it from ...
2
votes
0answers
53 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 ...
2
votes
0answers
70 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
183 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
2k 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 ...
1
vote
0answers
6 views

MySQL for EXCEL (2010) - Custom select query

I have the MySQL for Excel (MS E:2010) addin enabled (most current version). I've tested my connection to my server (non-local), and all is great, however I can't see anywhere to write / insert a ...
1
vote
0answers
49 views
+50

Have a different style set in different sections of the same Word document

I have a document "template" (not yet a template file type - I hope to create that as described below) for a report. The report is broken up into different sections: Letter to the Client Table of ...
1
vote
0answers
22 views

Excel VBA that calls Powershell ActiveDirectory cmdlet, but Module won't load?

I have a powershell script I use to dump user and computer lists to csv files; it works great and I don't want to touch it much. It uses the ActiveDirectory cmdlet, and the Get-ADComputer and ...
1
vote
0answers
51 views

MS Word 2010 - How do I create a universal macro that will auto-insert a header if none exists?

I'd like to create a macro enabled template that will automatically insert a header into a document if none exists. This is in order to work around a printing issue that cuts off the top of the ...
1
vote
0answers
43 views

VBA substitute for Microsoft Office RT?

I've been working on VBA-based applications for automating Excel and other MS Office applications. Now I'd like to expand to MS Office RT, but I've read that Office RT has no VBA support. Is there any ...
1
vote
0answers
41 views

Link Microsoft Excel to Word document

I need to link certain numbers in my word document to an excel file that I have. For example, the Revenue for FY2014 is "20,000". I would like the 20,000 to be linked to a certain cell in an excel ...
1
vote
0answers
35 views

Verify word document by vbscripting

Do you think vba will help me learn how to verify a word document by vbscripting. Or I have to strictly learn vb scripting for word documents. My main problem is I want to start verifying from line 7 ...
1
vote
0answers
15 views

Incomplete ListViews for CrossReference

I am using Word 2010 and have to often insert cross-references. Items to be cross-referenced are mostly table numbers and figure numbers, such as Talbe 1-2 or Figures 2-4. They always include chapter ...
1
vote
0answers
244 views

Reset Numbered List with Text Style VBA macro MS Word

I'm trying to make a VBA macro to create a Word document from Excel... Currently I'm having issues with setting up the Lists properly. I want the list indexes linked to my 2 header types. Like so: ...
1
vote
0answers
183 views

run-time error 1004 Application Defined or object-define error

I have this macro that I wrote: Dim lastColumn As Long lastColumns = wkbWorkbook2.Worksheets(2).Cells(1, Columns.Count).End(xlToLeft).Column 'this is the highlighted part in debug SourceRange.Copy ...
1
vote
0answers
55 views

Windows (partially) claims I have a private key for a foreign certificate

We have a MS Word document template with vba code produced and signed by an external firm. When I view the details of the signing certificate from within Word vba developer tools, it shows up with ...
1
vote
0answers
52 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
223 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
100 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
70 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
74 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
533 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 ...
1
vote
0answers
115 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
92 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
204 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
219 views

Microsoft Excel Copy one row to another worksheet if cell contains specific data

I have never written a macro in excel before. I am trying to organize my PTAs spirit wear orders for ease of placing the order. I have entered all orders into a master worksheet titled "spirit wear". ...
1
vote
0answers
380 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
290 views

Macro to copy and insert rows by variable number

I have an Excel 2003 worksheet with names and addresses, unique per row, to be used for shipping monthly magazines. Some members receive more than one copy of the magazine, which will be indicated in ...
1
vote
0answers
155 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
488 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
590 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
248 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
75 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
925 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
106 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
181 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
602 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
439 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
582 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
705 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 = ...
0
votes
0answers
18 views

Delineate Excel Formula Without Using Wizards

Is there a combination of excel formulas that I could use to do this without using VBA or the import wizard? I know how to insert comma delimited data from a text file and to split a cell into ...
0
votes
0answers
21 views

Error when running a VBA in Excel

I am trying to merge 150.000 different .xls files into one only one master sheet. I have done this many times before but I am suddenly receiving a error in the middle of the process. Here is the VBA ...
0
votes
0answers
31 views

VBA: Change highlight color (RGB not wbColor) with keyboard shorcut (MS Word 2013)

I have this module in VBA assigned to a keyboard shorcut to change the color of highlight: Sub RotateHighlightwbColor() Select Case Selection.Range.HighlightColorIndex Case wdYellow ...
0
votes
0answers
35 views
+50

How to change Control-Y behavior in Excel-VBA's IDE

Excel VBA's IDE register's a Control-y as "cut this line of code". By contrast, redo-ing is accomplished by Alt-e, R. Is there any way to change this behavior and make Control-y be the much more ...
0
votes
0answers
59 views

Excel 2010 shared workbook - image buttons disabled

I have several Excel workbooks which were originally created in a 2007 version. They are shared workbooks, and contain some VBA code, and are protected to prevent users from changing certain content. ...
0
votes
0answers
41 views

How to change the colours of sparkline axes individually

I found the following code (in the office docs) which allows me to change the axis colour of a group of sparklines: Sub AxisColor() 'The sparkline group Dim oSparkGroup As SparklineGroup ...
0
votes
0answers
30 views

Access 2007. Make each string in text box clickable?

Access 2007. Database table tblUsers, column tblUsers.fldItems. That column can contain nothing, one word or a delimited list of items (brush, comb, sprocket). In a form I have a text box ...
0
votes
0answers
15 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, "/", ...
0
votes
0answers
19 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 ...