Tagged Questions

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

-1
votes
1answer
99 views

How to re-arrange Excel database from 1 long row, into 3 short rows of unequal lengths and automatically repeat the process?

This question is an extension/continuation of my previous question at How to re-arrange Excel database from 1 long row, into 3 short rows and automatically repeat the process? which was answered by ...
1
vote
1answer
1k views

How do I copy hyperlink only (and not text) to another cell? [duplicate]

I have a spreadsheet where column A displays names. There are a few hundred names and each has a different hyperlink (which links to that person's web page). I want to transfer those hyperlinks across ...
0
votes
1answer
266 views

Set default expand/colapse state on pivot tables

The Setup I have a pivot table in tabular form pulling data from an Analysis Services Cube. I want to calculate the number of days between two dates, but the setup will only allow me to pull in all ...
1
vote
1answer
574 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 ...
0
votes
1answer
94 views

How to require a cell input if another cell has a value

I'm trying to edit the VBA for one of my workbooks so that If there is a value in column A, then a value for column C is required or else the file won't save, but i'm having some trouble with this. I ...
1
vote
0answers
74 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 ...
0
votes
1answer
393 views

VBA - Instead of ActiveExplorer.Selection to set folder, explicitly set folder path

Sub MoveItems() Dim Messages As Selection Dim Msg As MailItem Dim NS As NameSpace Set NS = Application.GetNamespace("MAPI") Set Messages = ActiveExplorer.Selection If ...
-2
votes
1answer
601 views

How to delete specific columns from all excel workbooks in a particular folder

I have a folder in which I have about 30 excel files. In each of these files, I need to delete about 20 specific columns. Here are some details: I am using Excel 2013 The columns are in the first ...
0
votes
1answer
257 views

VBA Solution to VLOOKUP with Hyperlinks

I am looking for some help with a VBA solution for preserving hyperlinks when using VLOOKUP on Excel (2010). I have a load of data on Sheet 1 for internal use only, and a cut-down version of this ...
0
votes
1answer
33 views

Is it possible to change or modify built-in VBA editor in Excel for Mac 2011

I am using the build-in VBA editor in Excel 2011, but the built-in editor doesn't respond well to my scrolling gestures. I'm having too much trouble writing/finding code. Is it possible to change ...
1
vote
1answer
498 views

Hide/Unhide rows based on more than one cell value

Please help me I am using the following code to hide rows if cell values are 0: Private Sub Worksheet_Calculate() Dim LastRow As Long, c As Range Application.EnableEvents = False LastRow = ...
0
votes
1answer
126 views

How to re-arrange Excel database from 1 long row, into 3 short rows and automatically repeat the process?

I would appreciate help on the above-mentioned topic. I am unfamiliar with Visual Basic for Excel, so will need step-by-step guidance (if solution is via Visual Basic). For example :- Row 1, Sheet A: ...
1
vote
2answers
116 views

Word - Extract picture 'alt text - description'

I have a word document with 500+ embedded images. For each image in the document, I want to get the 'Description' from the 'Alt text' section of the image (when you right click on an ...
4
votes
1answer
1k views

Add/Subtract button Excel VBA

Here is an example of my project in this picture I like collecting, so I am making an inventory sheet in Excel. I want to make a way that I can click a button and it affects the next, or previous ...
1
vote
0answers
54 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
1answer
64 views

Renaming/moving attachments using VB - Filenameincrement

This script may seem familiar because I took this copy from Superuser (or Stackoverflow) and changed it to suit my needs. The script moves Outlook items around, copies the attachment to a folder and ...
1
vote
2answers
4k views

Searching for a value in Excel, returning yes or no

I have one workbook, with two separate worksheets. I want to know if the values that appear in worksheet B also appear in worksheet A, if so, I want to return a "YES". If not, I want to return a "NO". ...
1
vote
3answers
130 views

Trouble using Excel OFFSET function

I have an Excel workbook with numerous sheets entitled "Week1", "Week2", "Week3" ... "Week7". Each week, I input the customers IDs of people buying my product in column C, and -- as I am interested ...
0
votes
1answer
319 views

VBA EXCEL: find method not working when looping through each cell in selection

I'm trying create a macro that, after a range selection, will tell me how many 20ft or 40ft containers where found in the sample. The macro basically looks for the string "1x20" or "1x40" and when ...
0
votes
2answers
259 views

Split single column data into multiple columns based on leap year in Excel 2013

I have about 100 files of MS Excel which consist of weather data. I need the data on yearly basis but the file has a single column with data of about 140 years and manually copy-paste is very time ...
1
vote
1answer
449 views

Can the data validation list width be controlled in Excel 2007 and greater?

In Excel 2007, I can add data validation to a cell, and supply a list of allowed values. However, experimentation suggests that the data validation drop-down list will never display at a smaller ...
0
votes
2answers
160 views

VBA Excel 2011 for Mac: Create custom category for user defined function error

I created several functions i.e.: "cal_adval". I would like to add it to a new function category named "Custom Clearance" I read the documentation, and wrote this macro: Sub add_category() ...
1
vote
1answer
26 views

How to generate a series of growing values and timestamps for cell that updates automatically?

I have a cell A1 which references a sheet that gets updated by an external source (database). My goal is to record a log that traces the growing value of cell A1 at each different time the data is ...
0
votes
1answer
119 views

VBA Code De-bugging in 2010 excel

Looking for some help in debugging some old VBA/Macro code to work in the newer version of MS Excel 2010. The macro in question is the "Material Rollup" function. The purpose of the macro is after ...
1
vote
1answer
106 views

Unable to edit data on datasheet in Ms Access 2013 - Get write conflict

I have been tasked with converting an old ADP project to something that Access 2013 can handle. I've imported all the forms and VBA, relinked the tables and changed the connection to an ODBC ...
1
vote
1answer
51 views

VBA change Script on multiple tables

Via this forum I found a way to refresh autofilters in a table automatically after the data in a excel worksheet has changed, using this VBA script: Private Sub Worksheet_Change(ByVal Target As ...
0
votes
0answers
102 views

Edit record on grid in an MS Access subform will not allow saving changes?

I am troubleshooting a form that was created in an older version of Access. There is a datasheet view on a subform of the main form. This form shows data but it will not allow me to edit the data. ...
1
vote
1answer
148 views

Excel - Change cell colour based on a date in the comment or mixed in with text

I am using excel 2010 and I am trying to set up a rule that will change the colour of a cell based on a date within that cell. For example the cell may contain Site meeting - 11.05.14 I would like ...
0
votes
3answers
71 views

Reformat data through macro excel 2010?

I am trying to create a macro that allows me to change the data I received from a client into data I can import into a system. The data I receive is in the format: How Can I do this through VBA ...
2
votes
3answers
288 views

Listing non-blank cells in Excel based on adjacent column(s)

Given columns A and B, I want to list the A-values that have a non-blank B-cell in their row, in column C: A B C One Two Two x Four Three Four x ... The best I came up with ...
0
votes
1answer
71 views

Clever way to connect multiple images to on-click macro - VAB Excel

I have asked this question before, but admittedly in a terrible way, so I am asking this again. So here I am once more. I am making a program in VBA Excel - or better, combining a certain worksheet ...
0
votes
0answers
81 views

Excel calculation uses an unlikely high amount of RAM does not release it [closed]

I have a sheet that contains about 30 matrix formulas, which are calculating with about 5000 rows of data. When I calculate the worksheet manually, RAM usage rises from about 400 MB (idle) to 2.5 ...
1
vote
1answer
41 views

How to get reference to the only datatable in the active sheet

I am adding a new row to the table I have in the active sheet using the following method: ActiveSheet.ListObjects("MyDataTable1").ListRows.Add(AlwaysInsert:=True) The problem is that it is ...
1
vote
1answer
107 views

Automatically sorting a range of cells after one cell within the range has been modified?

I have a number of named vertical ranges on a spreadsheet, containing lists of names. New names are usually manually added at the very end of each list. Obviously, this means that unless manually ...
0
votes
0answers
99 views

How do I Mail Merge from a SQL DB to Word 2013 with a date filter?

I have a SQL database view that returns the data I need for my mail merge. This data needs to be filtered by a Date Range. i.e. >1/1/2014 and <3/1/2014 I have attempted to put it in the filter ...
0
votes
0answers
158 views

I need to populate a text box with the value from one of two other text boxes based upon the selection made in a DropDown box

The DropDown box has three values: "None" "1st Lien Position" "2nd Lien Position" There are two other text boxes containing the values I need to copy into a third text box: Textbox 1: ...
2
votes
0answers
174 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 ...
0
votes
1answer
320 views

Load a picture from one inserted ActiveX Image to another - VBA Excel

I got a set of named pictures on an Excel sheet, created by the "Insert" button in development tag, and from the section "ActiveX controls" from the "Insert" button. What I want is, when I click on ...
3
votes
3answers
285 views

Custom user function without using VBA

Is it possible to create a custom user function in Excel without using VBA? My problem is I have a long string of standard excel functions strung together to make one very long function. This function ...
0
votes
1answer
68 views

How to implement conditional border formatting in Excel?

I need to force cells B, C, D, E to have an upper border IFF cell A is not empty. How can I do this ?
1
vote
1answer
192 views

When using multiple accounts, how to ensure emails are sent from the correct account

I use 2 email accounts with Outlook. One for work, one for personal. The problem I have is I am forever sending work emails from my personal account! How do I set up a list of "do not send email to ...
0
votes
2answers
425 views

How can I find out which parts of an Excel workbook are the biggest in size?

I have an Excel .xlsx that weights 47MB. I'd like to know which parts of the workbook are the heaviest and work them, since I haven't made much progress manually trying to identify and reduce the ...
0
votes
1answer
56 views

Removes rows (based on condition) and copy cells (based on condition)

I have to modify a huge VBA script, I am new to VBA and I must also say that I am not loving it :( I need some help writing an efficient For-loop, let me explain with an example. During the first ...
1
vote
3answers
168 views

Assign triggered code to multiple images - Excel VBA [duplicate]

I wanted to assign some specific actions when clicking on one of the images I have inserted in my Excel sheet. The problem is, I got 52 images (Poker cards for those wondering). So, my question is, is ...
0
votes
0answers
49 views

Export sheets and defined range to PDF

I'm trying to select these sheets in my project: Forside, Begrundelse, handelspris, dokumentation. In my dokumentation-sheet is a range defined in pages and I don't know how to add the defined page ...
0
votes
1answer
3k views

Merge Multiple Excel File

I need to merge a few hundred Excel files into in one Excel file. Each Excel file needs to be merged into its own worksheet in the workbook and the worksheet it's merged to needs to be have the name ...
0
votes
1answer
43 views

Identify Image in Excel - VBA

I have an Excel sheet, and I want to create some macros using VBA. Specifically, I want to change an image with a predefined one, every time I press a button or every time I press on an image. ...
2
votes
1answer
201 views

Getting the index entries of a Word document in VBA

I have a collection of Word docx files in various subfolders. I need to create an index file with links back to the original files. I thought that VBA might be the easiest way to do this. I can find a ...
2
votes
2answers
683 views

Align Secondary Axis Origin with Primary

I am interested in aligning my secondary axis such that it lines up exactly with my primary axis. To be more clear, I want the origins to both line up at 0 at the same place, each preserving their ...
0
votes
0answers
118 views

How do I really enable events in Word VBA?

I've found the instructions to enable events, but this does not always work. When I create a new document from a template events are not enabled. I've got the class module to have word run with ...