A macro in computer science is a rule or pattern that specifies how a certain input sequence should be mapped to a certain output sequence according to defined rules and procedures. **Consider using [tag:vba] tag instead of this one if the question concerns a Microsoft Office product. This helps ...

learn more… | top users | synonyms (1)

0
votes
1answer
15 views

Error: The Macro May Not Be Available In This Workbook Or All Macros May Be Disabled

I'm trying to adopt the solution from this post & I've modified the macro slightly (I only need to add on button click) so that it's now Sub AdjustValue() Dim btnName As String Dim ...
0
votes
0answers
13 views

Formatting paragraphs in Word based on leading characters

I'm trying to prepare some VBA code to be easily readable, so I'd like to highlight all the comments in the code by applying a more visible Style. However, there's quite a lot of them, so I'm looking ...
0
votes
1answer
23 views

How to display unique numerical values from different columns into a single cell (separated by commas)

I have a unique problem I have been trying to tackle with no avail. I have scoured through the internet but only found partial solutions and not a complete solution. I am looking for a function (or ...
0
votes
0answers
5 views

Pasting entire macros in a remote console shell

I am configuring a server using its remote console (which is not SSH, as I haven't installed the OS yet). Unfortunately after a long series of driver failures I end up repeating typing the following ...
0
votes
0answers
23 views

Creating a dropdown submenu in PowerPoint

I would like to know if it's possible to create a dropdown submenu in PowerPoint like the one for inserting a WordArt: If it's possible can you share with me some documentation about this?
0
votes
0answers
15 views

EXCEL macro opens document but does not ask to “update links”

I have an WORD doc with links to cells in an EXCEL document If I open the linked document manually, it asks to [Update automatic links] and works perfectly but, when I use the macro ...
0
votes
1answer
16 views

Excel Macro to draw xyscatter plot out VBA

I am trying to create a xy plot where the x values is the time axis (column A) and the y values are in the other columns. (in the example only C and D) When I try my code from below, I get a graph ...
-1
votes
2answers
28 views

how can i make my macro toggle a sheets visibility/hide?

i have the following code that i want to toggle a sheet being visible or being hidden: Sub toggle() If Sheets("Navigation (2)").Visible = True Then ActiveWindow.SelectedSheets.Visible = False ...
0
votes
2answers
22 views

how can I see what TYPE of data is in my macro?

I have the following code that doesn't work inside a macro: count = Application.Sheets.count ans = type(count) msgbox("count is " & ans) but this doesn't work cause I think type is looking for ...
0
votes
1answer
28 views

VBA warning when cells selected are not equal to 5 and contiguous

My Vb macro does the following: I select 5 contiguous cells, run my macro and I get 5 static random numbers between 1 and 50; It works perfectly; I need a warning when the selected cells are not ...
1
vote
0answers
18 views

run time error 1004 method open of object workbooks failed

I have this issue on one single PC only, and the error relates to opening an Excel workbook based on a macro-enabled template (xltm). Xltx files work fine. (Macros are enabled on this troublesome ...
3
votes
0answers
15 views

Terminate the Access macro after a specific time

I am running several MS Access macros from a batch file. The macro runs several queries in AccessDB. Things are working fine. But, I want to add a check. If a macro runs longer than a specific time, ...
3
votes
2answers
21 views

How to apply a macro/vba formula to more than just one cell

I have entered the follows: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$V$2" Then Range("U2") = Range("V2") * Range("O2") End If If Target.Address = "$U$2" Then ...
3
votes
0answers
20 views

Run a program and return value libreoffice calc [migrated]

I wrote an algorithm in c that takes input of double precision numbers and returns a double. I would like to use this in libreoffice calc. I tried making a macro function using shell but it only gives ...
0
votes
2answers
50 views

Adding or Replacing text within hyperlinks

I am very confused after trying to explore how this can be done. Its very simple but yet cant find a solution. What I wish to know is the following. I have three separate documents, all of which are ...
0
votes
1answer
30 views

How to default Macros to run from This Workbook, NOT All Open Workbooks?

We have a macro enabled workbook (ver. 2010) that many people use. A few of these people have macros in their Personal.xlsb workbook. We have a situation where the macro in the shared workbook is ...
0
votes
1answer
37 views

Using libreOffice Calc function in macro

I am trying to create a basic macro function in calc to perform a hexadecimal to binary conversion with more then 10 bits. But I've got a lot of troubles. First, where can I find actual ...
1
vote
1answer
26 views

MS word macro: how to change highlights form a specific color to another — inside the selected text?

I want to change the yellow highlights in the selected text (not in the whole document) to red highlights. This VBA does change the highlighted colors but it does not stop at the selected text (it ...
1
vote
1answer
35 views

Macro does not run when opening a File/Workbook from within Excel

I'm new to Macros and VBA in general but my goal is pretty simple I believe. My macro should search an opened Excel document (automatically) and create a MessageBox with a warning if the WEEKNUM() ...
1
vote
0answers
16 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 ...
0
votes
0answers
21 views

why does this select statement fail? it works as a macro but not as a button

i recorded a macro that selects a sheet and then a range. it works as a macro but it fails as a button, just want to know why? Private Sub CommandButton3_Click() manfix = InputBox("Enter in fixture ...
0
votes
1answer
34 views

Excel 2010 VBA click cell trigger macro to show list of values

When clicking on cell say d2 I want to show the values from j2:j6 in e2:e6. When clicking on cell d3 I want to show the values from k2:k6 in e2:e6, etc. Can someone help me? thanks
0
votes
1answer
58 views

How to view and change the assignment of keyboard shortcuts to existing macros?

In Microsoft Excel 2010, I have a macro assigned to a keyboard shortcut. Strangely, it's not working properly. I want to double-check the keyboard binding. How can I view and/or change the ...
0
votes
1answer
63 views

Multiply the Sum of one Cell if another cell shows value

I've added a hidden cell (T259) which calculates 10% of Cell U78 if "Mortar Joint" is selected in the Sales Agreement sheet. I want to add a function in cell U78 to add the value of T259. I am getting ...
0
votes
0answers
16 views

How to display URL's as Thumbnails into Excel [duplicate]

I am quite new with Macro's in Excel so hope you can support me. I do have many URL's shown in Horizontal lines (B2-E2 and B5-E5) in Excel 2013. What I would like to do is to show the image ...
2
votes
1answer
23 views

How can I use conditional formatting or a macro to italicize duplicates (but not the original) cells?

I have a spreadsheet in which there are many duplicates (intentionally), and I would like to highlight the duplicates but not the first instance of a cell. Below is an example row: A A A A A B B B C ...
0
votes
1answer
48 views

How to populate information from one sheet to another in Excel Workbook?

My current task is to create a formula where my information from one sheet will auto populate in another sheet when the product description is copied. To be specific, we need to have the items ...
0
votes
1answer
51 views

Create function by check box object name (“Dynamically”)

I have multiple check boxes in a sheet, and in another sheet I have a form. When a check box is selected, then the appropriate content will be added as a column in the form sheet. I have over 500 ...
0
votes
0answers
8 views

Excel, Ascending Workbook Default Filenames

Disclaimer: I'm very new to using VBA, so please bear with me! I'm currently using the following macro to quickly export 4 specific pages from a larger workbook to a new workbook that gets emailed ...
0
votes
1answer
37 views

Macro exports date column to csv as numeric value rather than dd/mm/yyyy

The following code has achieved what I require except that the date [cell B2] is exported as as five digit numeric value rather than dd/mm/yyyy. How to I amend the code to force B2 to export as ...
0
votes
2answers
20 views

How to run a code in each worksheet starting from worksheet 4

I have created a macro that calls another macro, then to run on each worksheet from worksheet 4. The macro runs on the first worksheet (worksheet 4), but then does not run on all the other worksheets. ...
1
vote
1answer
23 views

Macro to transpose based on nearby column number [closed]

This screenshot has details on what is needed. (Click image to enlarge) I need a macro that can perform the following in Excel: Use column F numbers (Line Count), to place in the values from ...
1
vote
1answer
18 views

Fix irregular shape of merged tables in MS Word 2007

I have been looking for the answer to this for quite some time, but to no avail, so I hope someone here will be able to help me. I have recently exported a document from FineReader 12 to word. The ...
0
votes
2answers
28 views

Outlook rule with macro quit firing

So, I set a rule in Outlook that whenever an e-mail from a specific source (our IPS alerting system) it would fire the below macro to save the attachment to my disk for further automated scripting ...
3
votes
1answer
56 views

Enable Macros after message box closes

Is there a way to enable Macros after the message bar with the Enable Macros button has closed? I opened the Excel file and immediately went to edit the VBA. When I went to run the VBA, it stated, ...
0
votes
0answers
17 views

Copy and paste rows on another sheet given the number of occurrences of a value in each row on another sheet

I have a list of college courses. There is a column that indicates which days (M for Mondays, T for Tuesdays, W for Wednesdays, R for Thursdays and F for Fridays) each course is offered. I have a ...
0
votes
0answers
24 views

Create macro in notepad++ that copies line of text from one text file and pastes to another text file?

For example, I have a text file that has a tons of lines, but I only need the lines in the file that include the text "Employee_user_id". So I was thinking of doing something like this, using ...
0
votes
2answers
60 views

Excel Text to Number is not changing the Format

I have a Macro in Excel that is trying to convert text to number (currency) a Column. The values in the cells are text that looks like this "USD 8,765.43" the objective would be to have a currency ...
0
votes
0answers
73 views

How to create an Outlook macro that updates a table's attributes?

Version: Outlook 2013 I want to be able to... Alter the font-size of the text in the table. Remove (uncheck) the "Preferred Width" attributes from the table, collumn, and cell active attributes. ...
1
vote
1answer
41 views

How do I make a macro to generate a record number based on the fiscal year? (Access 2013)

I would like to create a record number that is based upon the fiscal year and automatically advances... Something like: 2015001, 2015002, 2015003, 2015004; 2016001, 2016002, etc. I already have a ...
-1
votes
1answer
180 views

vba - html table to excel worksheet

I need a vba script that can extract local html table data to excel worksheet. I have a code (found it somewhere on the web) that works by using url link, but what i want is to be able to do it using ...
1
vote
1answer
86 views

Find all instances of a text and make it a hyperlink with a macro

Required I want to find all occurrences of a single text in a MS Word document, make each occurence a hyperlink and change the generic hyperlink style to one of my chosing. What I have As I have no ...
-1
votes
1answer
53 views

How to render html file in Microsoft Excel?

I was able to open an html file using vba, the problem is, the content is not in the sheet. Its just white. is there a way to open an html file using excel and be able to display the html content?
0
votes
2answers
63 views

Excel Personal Macro Workbook keeps getting disabled

I'm a new user to this site. I'm trying to run a VBA macro in Excel once a day at midnight using the windows task scheduler. It imports data from a .txt file that gets dropped into a folder at night, ...
1
vote
1answer
23 views

USD to CADollar error

I am trying to develop a macro that converts USD to CAD. So far, the macro converts the value of the active cell to CAD while displaying the initial formula (required). However, I get an error when ...
0
votes
1answer
16 views

Excel 2013 Macros/ sub procedures

After creating sub procedures, they are not considered part of the macro group. Why? How should a sub procedure be created so it is included in the list of macros?
0
votes
1answer
50 views

Change save file format in VBA

I read this question: Can I split a spreadsheet into multiple files based on a column in Excel 2007? I have a question regarding the "Save in same format as original workbook" that I hope you can ...
0
votes
1answer
38 views

Excel: how to add random decimals to numbers with a macro

I have a list of gps coordinates for a map that we need to randomize a bit as we cannot provide the exact addresses. I would like to shorten the original coordinates (that is the easy part as I just ...
0
votes
1answer
24 views

Excel VBA localisation issue - WIN 8.1 Enterprise, Excel 2007

I have a problem with file using VBA macros created in GER version of Excel. This macro is testing the pivot table item for "Alle", but when someone opens the file in EN version, the pivot table item ...
0
votes
1answer
22 views

Error running macro after trying to run it from pesonal workbook

So I wrote a macro. The scenario of use is: I open a fresh and new CSV file downloaded from somewhere My macro runs and does some magic with the data Since I don't want to copy-paste my macro to ...