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

4
votes
0answers
614 views

Excel VBA : SQL query handles error

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 VBA instead so I can use some ...
3
votes
0answers
361 views

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 ...
2
votes
0answers
18 views

Copy sheets to new workbook and clearing contents of cells in the new workbook

I am trying to copy various sheets into a new workbook, however, I would like to clear some of the contents after this is done in the new workbook. To better illustrate it, I have sheets a, b, c, d, ...
2
votes
0answers
99 views

VBA prompt for Copy and paste from combo box in active cell

Could anyone help me to copy and paste from combo box in active cell and below mentioned code created to copy and paste from drop down in active cell but i need a code to copy paste in any cell where ...
2
votes
0answers
28 views

Copy hyperlinks from original list to search index list

I've created a search index (using formulas) from a list of products that have hyperlinks attached (created with Insert Hyperlink). The search index is created without the hyperlinks however. Both ...
2
votes
0answers
48 views

Outlook 2013 VBA Editor Launches Without Displaying Debug and Edit Toolbars

Just an annoyance, but I've hunted through every editor command option to no avail. Just switched laptops, and in my old VBA editor it launched each time with no code windows open and the debug and ...
2
votes
0answers
335 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
58 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 ...
2
votes
0answers
242 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
377 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
368 views

Moving emails with specific number in subject to a specific folder with the corresponding number

I get emails in shared inbox containing a number in the subject (like 9921635). These emails are archived to subfolders, which are part of the shared inbox, that also contain this number. Sometimes ...
2
votes
0answers
686 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 ...
2
votes
0answers
1k 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 ...
2
votes
0answers
365 views

How can I create a Search folder that contains multiple object types in Outlook 2007 from a secondary mailbox?

I added an additional mailbox to my account. I want to create a view that is similar to the 'to do list' view that exists for that user. This means I want a search folder that searches that mailbox ...
1
vote
0answers
5 views

MS Outlook How to Alter Subject Line (Strip RE:/FW and Add Prefix)

I want to alter the subject line for incoming and outgoing emails via auto macro. Here is what I have been searching for: A macro to automatic strip RE:,Re:, FW:, Fw: from incoming emails. I tried ...
1
vote
0answers
34 views

macro's gone before/after saving to .docm

I am working on an excel file that opens a source document(word) that I want to save to another name but with the macro's from the source. Opening the file is not the problem but after this merge (I ...
1
vote
0answers
28 views

How to Mirror Cells when the source is a data validation list? (Excel 2010)

I have a workbook with two tabs. The first tab is being used as a table for data validation lists I'm creating in the second page. For example, one list is called "Supervisors". This list starts cell ...
1
vote
0answers
31 views

Retrieve email ID instead of name

Below coding retrieves all the information from .msg files. However, when it retrieve the email ID of sender and received, it is reflecting name instead of email ID. Please assist me and advise as to ...
1
vote
0answers
77 views

Excel VBA: How can I run code when any check box value changes in a Userform?

How can I run code when any check box value changes in a Userform? I am attempting to use a class module but the code is acting in a strange way that I don't understand. The code will only recognize ...
1
vote
0answers
28 views

How to add data vertically while xtracting tables from web page to excel

My code Public Sub Raju() Dim alertTime As Date alertTime = Now + TimeValue("0:05:00") ' ' mymacro Macro ' Dim ws As Worksheet Set ws = Worksheets("Sheet1") ...
1
vote
0answers
54 views

How to put name and registration number in a form

I'm creating a database which stores client related information, in which there are two tables:   A. Client registration   B. Work done. So I have created 2 forms:   a. ...
1
vote
0answers
15 views

shift data down in one sheet when a new value is entered in a different sheet

I've reached a point where I'm quite sure I need VBA but I don't know VBA so I need your help. So: I have a worksheet for organizing data on certain ceramic products. In my main sheet (called '...
1
vote
0answers
29 views

How to make text baseline and midline visible in Word?

I want to make baseline and midline (or x-height line to be precise) visible (and printable) in a line of text (presuming characters in the line are the same font and size). Is it possible to do so ...
1
vote
0answers
89 views

Pivot table with dynamic field names in Excel 2010

I am creating a workbook where the user can paste in their dataset in a worksheet. This dynamic range will be used to generate a series of pivot tables on subsequent worksheets. This works well when ...
1
vote
0answers
35 views

Section of VBA code is stuck in a loop

From what I can see this code should work but it ends up stuck in a loop so obviously there is still an issue. The intention is to start at cell E70 and paste a value obtained from cell X38. Move ...
1
vote
0answers
120 views

VBA code to select by a cell value and date range to move data from one sheet to another

I am having trouble getting a VBA code that I have adapted for my program to run. There are things in it that I don't understand and I don't know how to fix. I am trying to filter data from a "Sales" ...
1
vote
0answers
24 views

Aggregating Repeating Labels in Excel Sheet into Proper Table

I have an excel file with two columns: the first contains a repeating sequence of 14 labels, while the second contains the text values associated with those labels. What I'd like to do is aggregate ...
1
vote
0answers
18 views

How can I set Microsoft Word up to change any text encapsulated in `backticks` to monospace?

I wish to be able to type `simple code` in between backticks as shown, and have Word automatically change the font to some monospace variant. I am aware of alternatives such as LaTeX, but would like ...
1
vote
0answers
80 views

Not all docVariable fields updating

In Word 2010 have created a userform for a document at work, allowing for information to be entered that is then input into the document repeatedly throughout. I'm using docVariable fields to achieve ...
1
vote
0answers
174 views

Programmatically rotate a pie chart to fix the labels

Part 1 I'm looking at a way to automatically rotate (with VBA) a pie chart depending on the data. The data is changed dynamically depending on the month selected. Here is an example of the kind of ...
1
vote
0answers
88 views

Regex to find commas, excluding commas inside a string demarcated by double quotes

I would like to manipulate a closed .csv file without opening it through a button on an Excel AddIn. I am able to complete all the steps but am having a problem with finding a regex that would ...
1
vote
0answers
32 views

Extract Webdata from Microsoft word

I want to extract data from specific website into word I have table containig hyperliks I want to extract some data from that link to next cell in word Is it possible to copy html from or in ...
1
vote
0answers
85 views

Can MS Access make a column-of-rows type of form like the one pictured?

I am trying to make a form consisting of multiple forms stacked side-by-side in Access, like the one pictured below but have run into many, many issues. I will settle for a report if I can't get a ...
1
vote
0answers
43 views

VBA is disabled in Excel Home and Student 2010 (on XP SP3)

Everything seems to be working fine with Office, except that in Excel the VBA/Macro functionality is disabled. I cannot launch the editor, all macro-enabled files are interpreted as corrupt and the '...
1
vote
0answers
25 views

Control Number Generation

So currently I have the following. When I click a button or hit submit button The form looks on the Ledger Tab. I was trying to get the form to automatically generate a control number (ConNum) that ...
1
vote
0answers
60 views

How can I ensure that a formula that I have written to calculate the difference between time values applies only to the filtered values?

I have two columns of data: Member Time A 09/24/2015 09:48:36 A 09/24/2015 09:47:40 A 09/24/2015 10:11:06 A 09/24/2015 10:08:47 B 09/24/2015 10:28:45 B 09/...
1
vote
0answers
91 views

How to use Selection.Paragraphs.Count in Word to repeat a process X number of times

I select X number of paragraphs in Word and want to activate a macro that performs the same action on each paragraph. The action is adding a style separator before the first period in each paragraph ...
1
vote
0answers
443 views

“Microsoft Excel is waiting for another application to complete an OLE action” interrupting VBA code

I've got an Excel workbook that is running some VBA code, which I use every day. During execution, it keeps hanging on a dialog box saying "Microsoft Excel is waiting for another application to ...
1
vote
0answers
70 views

Automatically Printscreen from result of formula

I have a procedure in VBA to call a PrintScreen: Sub PrintScreen() keybd_event VK_SNAPSHOT, 1, 0, 0 End Sub I want to call it every ten seconds, when the result of this cell =IFERROR(VALUE(TEXT(...
1
vote
0answers
109 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
57 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
53 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
62 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
342 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
72 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
87 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
655 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
161 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
130 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
141 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.