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

0
votes
1answer
42 views

How Can I Comment a Block of Text in Microsoft Office Visual Basic Editor?

Sometimes when I'm writing a macro in Excel's Visual Basic Editor (VBE), I want to comment out a block of code to test the macro without it. I know I could go to each line and type an apostrophe ('), ...
0
votes
1answer
33 views

how to make a Copy formula, Value from A3 to B3 if z3 = csl

Is it possible to have a formula that can copy text value from A3 drop down list of cars, paste the text Value into B3, once i put CSl into Z3. then i can delete A3 but still have the text Value in ...
0
votes
1answer
291 views

How to create a macro in Outlook 2010 to add the the date to the subject line

I am new to the VBA format of writing code and I have been researching how to get the current date to AUTO input into the Subject line of an email when commanded. I need to know how to complete the ...
0
votes
0answers
51 views

How do I bulk replace a hyperlink containing a File:\\ command in excel

I work with Sharepoint 2007 and Excel 2007 In SharePoint I sometimes use a hyperlink with the file command like; (file://\\group.net.dk\sites\S01625\stt\Drawings). This is useful when I want to open ...
0
votes
0answers
114 views

Trying to get VLOOKUP to get data from a table array on another workbook where the worksheet name is variable

I currently pull data in from 4 workbooks using the INDIRECT function, the formula is as follows, =INDIRECT("'[" & $AE$1 & "]" & $AA$13 &"'!" & $AI$1) $AE$1 contains the workbook ...
-1
votes
1answer
52 views

VBA not recognizing MsgBox property VbMsgBoxStyle

I'm getting the error message "Compile Error: Named argument not found," when I try to run my VBA code. VBA doesn't seem to recognize the last property VbMsgBoxStyle. Dim dump As VbMsgBoxResult dump ...
0
votes
1answer
50 views

VBA Validate input in the input box

I need an input box that will provide a value that is an enumerator. MSDN Does not mention validating the fields at all. Is there a way of doing that? Like in HTML5 the pattern in input tag? Here ...
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 ...
0
votes
1answer
47 views

Macro to create a text file with values from cells and text

Im trying to create a macro in excel that creates a text file which some of the parameters are on excel cells. The output would be for example: The kid is 'cell (1,1)' old. His name is 'cell ...
0
votes
3answers
29 views

How to record in adjacent cell what my drop down selection was, as a Hard Record formula? plz

is there a excel function coding which can record in an adjacent cell what my drop down selection was From cell A3, into Cell B3, but to keep this even if i remove the drop down selection at a later ...
0
votes
1answer
124 views

Excel VBA Date format: Hyphen as separator gives wierd substitution result

Excel 2007. I want a macro to put today's date in the current cell formatted as dd-mmm-yy, e.g. 30-Oct-14. The code I have is simple : 'ActiveCell.Value = Format(Now(), "dd-mmm-yy")' For some ...
0
votes
1answer
73 views

Inserting Autotext (or Quickpart) into Word (2013) on the basis of a Boolean value from Access (2013)

Haven't found any info on this anywhere on the net (at least any that works--more on that in a moment). What I am trying to do is have, at the push of a button that I have created in an Access Form, ...
0
votes
0answers
69 views

Trying to start a file upon opening Excel 2013 using XLSTART

How do I get excel to load an certain file using xlStart. I found C:\Users\mdowney\AppData\Roaming\Microsoft\Excel\XLSTART Added the file and its not working.
0
votes
1answer
29 views

Adding another value in Excel cell/column if another cell has particular value

I wanted to be able to create a macro to change the value in Cell B to EPTBSIET if it equaled that value in Cell E - SIETCO. I've been able to compile an IF formula but would rather have the value not ...
0
votes
2answers
118 views

How To Extract Pattern from a folder path (VBA Excel)

I'm pretty new to vba excel and trying to reorganise a very large file structure. Basically, all our equipment has a tag in the form of [A-Z][0-9]0-9][0-9][A-Z] e.g. J452G being a compressor. Every ...
0
votes
2answers
276 views

VBA code to select certain worksheets in Excel and save as new workbook?

Is it possible to use VBA in order to select certain worksheets in an Excel workbook and save as new workbook file?
1
vote
0answers
31 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
2answers
325 views

Outlook VBA macro to forward email attachment, but delete message body

I am trying to add a custom action to a rule in Outlook where a message is automatically forwarded and the attachment stays but the original body message is deleted. I need to write code for the ...
-1
votes
2answers
594 views

Use Excel VBA If value in column a is not in column b then add value to column c

Dim i As Variant 'For i = 1 To 5 For Each i In rngWatch Dim c As Variant c = rngWatch.Cells(i, 1).Value If i <> rngReconcile.Cells(i, 1).Value Then MsgBox i ...
0
votes
0answers
29 views

save a sheet in new closed workbook without links

I have this code which work pretty good but I have a problem that the new exel workbook have links from the old one. Sub archive() Dim FileExtStr As String Dim FileFormatNum As Long Dim xWs As ...
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 ...
0
votes
0answers
116 views

Excel VBA Script How to Open a File and Insert character into Cell

I'm hoping this is an easy one. I am importing a directory of CSV files with long numbers (16 digits plus 4 leading zeroes). I need Excel to preserve the number data instead of applying scientific ...
1
vote
0answers
35 views

Excel update pop up, what is the root cause

Recently when I open my XLSM files (Excel 2013, Macro enabled workbooks) I see this popup. Can anyone please tell me what is the cause for this pop up? I am not referring to any URLs using VBA in ...
0
votes
2answers
51 views

How to add commonly used (non-signature) phrase in emails?

I have a text line with a hyperlink that I would like to readily use in composing emails. It is not a signature, so it doesn’t fit there. How can I build a macro that would allow me to add this text ...
0
votes
1answer
96 views

In Excel, how can I automatically change the data of a cell (VBA)?

I would like to automatically change the contents of cells when data is pasted into them. The data will be pasted into Column Q of a sheet on Excel. I need it to match it with data in Column A of ...
1
vote
0answers
214 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
votes
1answer
85 views

Macro - Moving User Specified Email to Folder

I have created small scripts before but never created an Outlook VBA before. I am hoping someone can guide me in the right direction or provide a couple lines of code to get me started. We receive ...
0
votes
0answers
60 views

Find and replace multiple values within selected cells using another workbook

I was wondering whether anyone could point out what's wrong with the VBA code below. It's based on the following: Find and replace multiple values within selected cells I want it to take the find ...
1
vote
2answers
90 views

Hiding all but the selected rows of data

I am unable to send any pictures, The data contains 98 column headings, with the first column being unique identifiers, and 1000 rows of items. I receive commentary on specific items throughout the ...
1
vote
0answers
41 views

Show Lync Status on Interactive Page

I have an idea for a concept and i'm not sure in what format it can/will be: Our organisation has many employees that sit across a very large office. We have a desk plan hard-copy that shows names ...
1
vote
1answer
103 views

Changing a String Value to Date format in VBA

I am working on a VBA scripting in Excel. The following is the code that i am working on. Option Explicit Sub MoveThingsAbout() Worksheets("Sheet3").Cells.Clear ...
1
vote
1answer
98 views

Word VBA of CrossReference

I am using Word 2010 and want to create a VBA script to insert a cross-reference. I often insert a cross-reference of table numbers and figure numbers. So, I want to firstly show a dialog to answer ...
0
votes
0answers
85 views

Excel 2013 - VBA has suddenly become disabled

I have an issue with Excel 2013 in that VBA seems to have suddenly become disabled. I am getting the following message "this workbook has lost its VBA project, ActiveX controls and any other ...
-1
votes
1answer
277 views

Excel 2010 VBA or formula to find value in dynamic column based off entry (vlookup like) but copy the value and paste the value into the cell

My question is rather complex so I will try to use examples and be clear as possible. In one table I have values that are populated based off formula: Name Timestamp Datedif1 123 1-Oct 1 ...
-2
votes
1answer
192 views

Excel, using cell text references as input for formula

First of all thanks for your help. I have a problem regarding the use of text into formulas. I am working on a huge dataset of stocks of several years. The stock are not correctly grouped. I used an ...
0
votes
0answers
37 views

How can I check that a filter applied to a listobject column with vba is legal?

Filtering a listobject(excel table) with a value that doesn't exit results all rows instead of none can I get no rows? can I get list of optional legal parameters? example listobject with col A ...
0
votes
0answers
66 views

Consolidating data from multiple sheets into a single sheet based on specific criteria

I have over 300 excel sheets all having stock data over a year. This data is date wise. However I want to group this data based on stock name, i.e., if I have stock A in all my sheets, then all data ...
0
votes
0answers
170 views

vba excel macro runtime error 1004

Dim lastC As Long lastC = wb2.Worksheets(2).Cells(1, Columns.Count).End(xlToLeft).Column 'highlighted in debug SourceRange.Copy wb2.Worksheets(2).Cells(1, lastC + 1).PasteSpecial Paste:=xlPasteValues, ...
0
votes
1answer
110 views

Word VBA parse text and turn it into a table

Input: ##TABLE_START## ##ROWS=3 ##COLS=2 ##Value ##Decode ##0 ##Clock running ##1 ##Clock not running ##TABLE_END## ##TABLE_START## ##ROWS=4 ##COLS=2 ##Value ##Decode ##0 ##Off ##1 ##On ##Z ##High Z ...
0
votes
1answer
142 views

modify Excel macro to reference list of text rather than hard code

I’m trying to get some help with the last step of an Excel Macro I’ve been working on. I’ve set up a Macro that will take data from sheets from two different workbooks, and paste them into a third ...
0
votes
1answer
71 views

Powerpoint VBA References

I am writing a VBA code on Powerpoint, where I need to call and excel file for input. Programme is functioning fine, runs without error, and generates output, except for the part where Excel file is ...
1
vote
2answers
37 views

Code iterating slowly

I have a simple macro that gets creates 16 different versions of a template, updating by getting values from another open workbook. It is taking over a minute to iterate only 16 times and was ...
0
votes
1answer
495 views

VBA: How to replace entire Excel cell value basing on its content?

I have an Excel Spreadsheet with some names in a cells. There can be as one name per cell as multiple names in one cell. For example: Cell A5 contains "Joe", cell BD54 contains "Joe;Harry;Molly", ...
-1
votes
1answer
598 views

Break the forgotten encrypted password of excel workbook

i have an Excel 2010 workbook, on which i applied an Encrypted (128 bits AES) password, which i can't remember now, is there any way to remove/reset or retrieve that password or any method to retrieve ...
0
votes
0answers
67 views

Excel VBA macro - i need to insert column and add a default value to all the cells in that column

I have created a macro but i could not insert columns in it and i could not add values to that coulmn. I want to insert a column and the default value to that entire column should be CH. column ...
0
votes
1answer
74 views

Make formula impossible to find / read

I have developed a spreadsheet for performing various calculations which our employees will complete and then distribute to clients / competitors. To protect the "intellectual property" of the ...
0
votes
1answer
22 views

Formula to determine available options based on prerequisites

Example: A spreadsheet for a single studient has four columns: Course|Completed?|Prerequisites|Available The "Course" column lists the names of courses. The "Completed?" column indicates a "yes" if ...
0
votes
2answers
42 views

Specific Row Values in Excel

How can one ask Excel to record the value of all cells in a given column such that the row number is of the form row = 2^i for i in 1 to 100? Would this necessarily use VBA?
0
votes
1answer
68 views

Copy a specific cell on all sheets to master sheet

I have a master sheet with the format as below: Master sheet Column A Column B Column C No Description Price And multiple sheets with the format below: Sheet ...
0
votes
3answers
273 views

EXCEL - How to have a formula output and user input on the same cell?

I would like help from someone as I believe this problem requires VB. I basically have a CELL(A4) where people will be entering values to find out the corresponding calculations displayed below. ...