Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vba]

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. Good questions on VBA generally contain some code and asks for solution of specific issues. Questions asking for entire solutions (please give me the code / how to do this and this with VBA) are off topic and will be closed as too broad.

0
votes
1answer
688 views

visual basic save failed due to out of memory or disk space

I'm editing a macro in Word 2007 in Windows XP. When I try to save this macro, I get the following error message: save failed due to out of memory or disk space Now, I have plenty of disk space ...
2
votes
2answers
2k views

Excel 2007 VBA macros don't work in Parallels

I've got a complex Excel spreadsheet I need to use at work. My colleagues use the spreadsheet on Windows PC's, with no special configuration required. I want to run it on a MacBook Pro running Snow ...
2
votes
2answers
5k views

Format Change Event for Excel VBA

I'm trying to prevent people from modifying (most) of my spreadsheet while still alowing them to use the sort function of the AutoFilter. What I've done so far is used the Worksheet_Change event and ...
1
vote
1answer
3k views

Getting VBA error when opening Excel 2007 on new computer

I have a user with a new computer that whenever Excel is opened gives the error message Opening the VBA project in this file requires a component that is not currently installed The message is the ...
1
vote
3answers
5k views

How to input only unique values in a column in Excel 2007

I'd like to know the easiest way to make sure that only unique strings are entered in a particular column in MS Excel 2007? I know I have to put a formula in the Data > Data Validation, but I don't ...
1
vote
1answer
604 views

Excel: Why use an XLA and not just a blank XLS?

Someone has put lots of Macros in blank XLS documents, and now someone has aked me to put them into an XLA document. Why and for what purpose? The Macro's loop through opening workbooks and copy/...
0
votes
3answers
3k views

Excel VBA/Macro: how can I delete rows and remove dots & dashes?

I've recently been handed an Excel file to format - 100's of lines. The image below shows you the state of it. This could be a really long exercise if I work through it manually, so I wondered if a ...
8
votes
3answers
49k views

Import json data into Excel

I have a text file in json format and want to read it into Excel. A very simplified example of the json file has the following structure: { [ { 'a': 10, 'b': 20 }, { 'a': 20, 'b': 22 }, { 'a': ...
2
votes
2answers
1k views

Excel Macros 2007: How can I Bold the Row if a number is in Column A?

My long list of data has numbers in Column A, but in random rows. How can a macro be written to find a number in Column A and then bold the corresponding data in that row? I know if I record my ...
-1
votes
3answers
10k views

Speech to text in Word 2007

How to enable Speech to Text in Microsoft Word 2007 ? I have found guides for text to speech but I am rather interested into speech to text.
1
vote
1answer
203 views

Replicating common Excel Functions

I am always curious how some of the functions I use in excel were written, and think it would help at times to see how it was done. Does anyone know where there is example vba that replicates what ...
2
votes
1answer
4k views

How is starting and ending row number of a Range obtained?

Given a user-selected Range, what is the simplest way to determine the starting row number, and ending row number? Range.Address returns a string containing any number of possible formats. There has ...
1
vote
2answers
119 views

Automatically sending mails from office

I have VBA code in Excell that send mails, but every time it wait few second for me to accept the sending. Some time before I changed two (2) keys in registry and it sends without asking me for ...
2
votes
1answer
4k views

Automatically move deleted Outlook items to archive folder after two weeks

Is there way to set up a rule in Outlook to automatically move my deleted items and sent items after a certain amount of time, say two weeks, to an archive folder? If it can't be done with a rule ...
0
votes
0answers
207 views

Help with Ms Access 2007 Combo boxes

What's the most efficient way to "chain" combo/boxes in an Access 2007 form, so that the result of the first affected the contents of the second? I already know how to associate a combo box on a form ...
11
votes
4answers
47k views

Where to find a VBA function's source in Excel

I have a workbook that uses a certain vba function which doesn't appear in the Insert | Insert Function... dialog box list of available functions. How do I find it's source (to see what it does)?
6
votes
3answers
6k views

Excel: Update a value in a named range

I've got some cells in an Excel doc populated from a named range (data/validation/list source=MyNamedRange): Here, the A1:A3 range is named Foobar B5:B6 is under data validation with it's source set ...
0
votes
1answer
369 views

Help to bypass password for sample projects of excel

I am doing project in EXCEL VBA. i am taking refernce of some projects made in excel vba. But when I trid to open that excel sample projects, it ask me for password. so how can bypass password for ...
15
votes
2answers
70k views

Any Excel function that will reverse a string?

Are there any built-in Excel functions that will reverse a string?
6
votes
1answer
62k views

Inserting a (jpg) picture into a cell in Microsoft Excel 2007

Is it possible to insert a jpg image inside a cell, or do Excel cells only display alphanumeric characters (or references)?
2
votes
2answers
4k views

excel autocomplete combo-box with on-selection event

I have an excel sheet for groceries. One column is the name, another is whether to buy it or not (checkbox) and another is the amount. I'd like to have a widget in the top row so that I start typing ...
0
votes
1answer
1k views

Using Excel VBA to capture standard toolbar use

I am looking for a way to capture a click on a standard toolbar tool in Excel with VBA. The primary need is to capture any Copy, Cut, and Paste request by the user. I can capture the hot keys for ...
2
votes
4answers
48k views

Filling cells with sequential numbers in an Excel (2003) macro

I need to fill an excel column with a sequential series, in this case from -500 to 1000. I've got a macro to do it, but it takes a lot of lines for something that seems like it should be a single ...
2
votes
1answer
6k views

Convert to Range VBA code

Does anyone know how to "Convert to Range" in VBA code... I need to convert the "dam" table before applying a subtotal ...hhmmmm
4
votes
1answer
548 views

Excel 2003 macro doesn't see named cell

I'm trying to clean up an excel macro where I was referencing cells directly ("LoopCount = Range("E4").Value") instead of using named cells ("LoopCount = Cell_LoopCount"). So I named cell E4 "...
1
vote
1answer
2k views

Excel VBA (2007) Subtotal method of Range class failed

I'm getting a Subtotal method of Range class failed Error when I try to run a macro in Excel 2007. Code works GREAT (no errors) when I run it using Excel 2003. Here's a snippet... 'SubTotal Sheet ...
2
votes
1answer
2k views

Why don't I have a “Web Service References” menu item in excel/VBA?

I'm trying to consume a SOAP web service from excel. Now according to This article (and confirmed by other articles and MSDN) if I do the following: Install the web services toolkit (I've installed ...
2
votes
1answer
184 views

Return the date of the day under an if formula with Excel or VBA

I have two columns A and B and many lines with some specific tasks to be done. In column B, I have a drop-down list with the name of people who are scheduled for the task . And in column A, I want the ...
2
votes
1answer
833 views

Outlook 2007 VBA/Macro

I am a very amateur user new to macros and VBA. My problem is that I recive online orders to which I need to click an auto generated unique order hyperlink to confirm receipt of the order within a ...
3
votes
3answers
4k views

How to add URL in a cell comment using VBA?

I am using Microsoft Excel 2003 wherein i have a cell which has a comment. The comment has text as well as URL. Is it possible to create a hyperlink (URL) in comment box where user can click and it ...
2
votes
3answers
3k views

Microsoft Excel – How to link or copy cells to a different worksheet on every nth row

Microsoft Excel – How to link or copy cells to a different worksheet on every nth row. I have an interesting problem. It is probably simple, but I can’t figure it out. I have a list of cells (about ...
1
vote
1answer
2k views

How do I write a macro in Outlook 2007 to move an item out of my Inbox to another folder and marke it as unread?

I would like to have a macro in Outlook 2007 to move selected items to sub-folders of my Inbox, marking them as unread as I go. This way I can assign buttons to move items quickly to my deal today and ...
1
vote
1answer
13k views

How can I remove a password on an Excel 2007 VBA project?

Is there any way to remove the password on an Excel 2007 VBA project? (Either within Excel itself of with some other application.)
1
vote
2answers
712 views

ms-excel: bubble trouble - creating amazing looking charts [duplicate]

Possible Duplicate: MS Excel: Bubble trouble - creating amazing looking charts i am reading this article: http://www.juiceanalytics.com/writing/bubble-trouble/ i would like to make a chart that ...
0
votes
2answers
809 views

Macro to change a date from American to English?

How can I change all dates on a sheet from American format (mm/dd/yyyy) to English format (dd/mm/yyyy)? Is there a way to do this with a VBA macro?
1
vote
2answers
2k views

Interacting w/ Graphs Using VBA in Word 2007

I have a long MS Word 2007 document, in which I occasionally need to replace all of the embedded graphs. The changes are simple enough and regular enough that I could probably write a VBA macro to ...
1
vote
1answer
1k views

What would keep a Microsoft Word AutoNew() macro from running?

I'm using Microsoft Office 2003 and creating a bunch of template documents to standardize some tasks. I know it's standard practice to put the templates in an certain place Office expects to find ...
2
votes
1answer
4k views

Why does my regular expressions invoke error '5018' in my VBA script in Excel

I just wrote my first VBA script for Excel because I have to write many "*.txt" files from a folder into an excel spreadsheet. But when I run this script, I get the error '5018'. It is invoked by the ...
1
vote
2answers
7k views

Macro to open excel hyperlinks

I would like to know if anyone can help me do a macro to open a list of hyper links. I have a list of about 600 hyper links all in a column in separate rows, I have to open each one to see if the ...
0
votes
1answer
1k views

append a text string to the left of all the cells of a column in excel 2002?

I have two columns with two values.. I want to append some text to the left of all the cells of Column A and concatenate to the right of all the cells of Column B. Basically I'm trying to avoid ...
1
vote
2answers
40k views

Excel VBA: how to clear a selection without activating the sheet

Edit: Not to clear the data in the selection, rather to remove the selection itself. I suppose this would be equivalent to selecting a different range, such as A1..
14
votes
1answer
35k views

Recover sheet protection password in Excel

I have an Excel workbook. Two years before I set password protection option for one of the sheets. Now I have forgotten the password. Is there any way to recover the password of that Excel sheet?
8
votes
5answers
63k views

Select an entire column minus header row in an Excel macro

How would I access a range that corresponds to an entire column starting at row 2 (there is a header row)? The end of the selection should be the last non-empty cell in the column.
24
votes
4answers
39k views

Open Multiple Instances of Excel without PERSONAL.xlsb Lock Message

Whenever I open more than I instance of Excel, I get the following message: PERSONAL.xlsb is locked for editing Q: How can I disable or hide this message? Alternatively, if someone could ...
6
votes
2answers
7k views

What would an Outlook 2007 macro to automate Paste Special - Unformatted Text look like?

I'd like to assign a macro in Outlook 2007 to a Toolbar button that would execute the equivalent of these clicks when there is formatted text in the Windows clipboard: Click the Paste icon by the ...
1
vote
4answers
23k views

Excel 2007 | Remove blank fields from pivot tables

Every time I create a pivot table (available for all Excel versions) I get one or several blank fields. How can I get rid of them? One workaround I used was to select the blank field, right click | ...
2
votes
3answers
5k views

Fix a (Today) Date in Excel

I have a file with a VB macro that puts a TODAY() formula in a cell when I click a button. The formula is volatile and updates every time the sheet is calculated. Instead, I would like to lock the ...
3
votes
2answers
2k views

Convert Excel 4.0 macro to VBA

Is there a tool to convert Excel 4.0 macros to VBA?