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 [vba] tag instead of this one if the question concerns a Microsoft Office product. This helps the ...

learn more… | top users | synonyms (1)

-2
votes
1answer
54 views

How do I run a VBA function in Excel? [duplicate]

I want to run this function I opened the developer tab in excel, no clue what to do now. I tried creating a "macro button", and then paste the function code in the macro script, but if I press play I ...
0
votes
0answers
55 views

Macro that can import data from a worksheet to another worksheet but placed on specific columns

Can someone kindly assist me in creating a macro that can manipulate data as needed? source file: [2 columns] [05:51:59] SANJEEV: Hello [05:52:03] Dennis: Hello, Sanjeev. [05:52:05] SANJEEV: HI ...
0
votes
0answers
5 views

Custom macro function to change settings in Windows Environement [duplicate]

I wonder if someone knows about customizing a Windows Environment under your needs, such as custom hotkey combination to do some or another function, for example: I want, under this combination of ...
0
votes
0answers
29 views

Sublime Text 3 - Find and Replace

I have a rather large page of code where none of the test cases were numbered via line comment. The numbering comes in handy when a test fails, so we can quickly find the failing test case and mark it ...
0
votes
0answers
24 views

How do I create a VBA macro that copies non-duplicate data from sheet2 to sheet1 in Excel? [duplicate]

I have two sheets in an Excel workbook: Master and NewData. I want to copy rows from NewData to Master only if it's not something already in Master. ("New data", get it? ;)) (Columns A:J would be the ...
1
vote
1answer
90 views

Publisher Macro run in all documents

I wrote a macro in Publisher and have added it to my Quick Access Bar. Unfortunately, the macro only runs in the document that created it. In all other documents, the button does nothing. Is there a ...
1
vote
2answers
424 views

Naming an Object in Excel VBA so it can be selected once it's copied to another sheet/workbook

I'm amateurishly putting together macro/VBA in Excel. It involves copying an image, which is of a legend in a different language, from Source.xlsx, and pasting it into Destination.xlsx. The image is ...
0
votes
1answer
50 views

How to replace following script to search for values and not strings?

I have the following macro which iterates though each cell in a specified column. If the cell contains a value of the string #VALUE!, it is replaced by the average of 2 cells above and below it (which ...
0
votes
1answer
284 views

Excel 2016 Macros - Windows/Mac Issue

I'm using Excel 2016 (Desktop - not online) and I've created a worbook with a Macro that I've signed using a self-signed certificate. I've set the 'trust center' settings on Windows so it will only ...
0
votes
0answers
184 views

VBA/Macros Runtime Error Fix (Run-time error '13': Type mismatch)

Run-time error '13': Type mismatch Is the error code. A previous person made a macros which hides all blank rows and assigned it to a button. Recently someone made some changes which affected many ...
0
votes
1answer
36 views

Creating a Macro to sort items by date entered (results triggered from formula)

I have Sheet 1 where I am entering in new data on a worksheet, and on my Reference sheet I am pulling the same values from sheet 1 in so that I can sort them by time entered. My goal is to have a ...
1
vote
1answer
37 views

Applying settings by default to CSV documents opened in MS Excel

End-users of a system we are developing are given a plain-old CSV file that end users will be opening in MS Excel. One of the columns will contain entries which consist of strings of numeric digits. ...
0
votes
1answer
509 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
39 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
40 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
9 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
47 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
24 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 objWord....
0
votes
1answer
72 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
52 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
24 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
49 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
175 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 PC)...
3
votes
0answers
40 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
112 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 ...
0
votes
2answers
57 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
68 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
156 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 documentation?...
1
vote
1answer
249 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
543 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
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 ...
0
votes
0answers
24 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
161 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
85 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
86 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
47 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
191 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
85 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
11 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
42 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 dd/mm/...
0
votes
2answers
29 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
26 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
44 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
54 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
103 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
128 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 notepad+...
0
votes
2answers
210 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
240 views

How to create an Outlook macro that updates a table's attributes to shrink a table to the contained text without wrapping?

Version: Outlook 2013 I want to be able to... Alter the font-size of the text in the table. (Done) Remove (uncheck) the "Preferred Width" attributes from the table, collumn, and cell active ...
1
vote
1answer
108 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 [...