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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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 ...

-2
votes
0answers
22 views

Exel VBA Absolute and Relative Path

Excel 2016. I have an application with a Path Desktop to open, display and export files. Below are two lines to code running well: sExcelWB = "D:\testing\" & "qry_task.xls" sExcelWB = "C:\Users\...
0
votes
0answers
55 views

Excel vba, Changing cell references in formula to point to different cell location

I am trying to move (offset) only parts of formula column location to a different column location by a specified amount of columns. The formula cells change from sheet to sheet. I have thousands of ...
-2
votes
0answers
28 views

Why am I receiving prompts to update links when my VBA code is set to turn this off?

I am trying to create a macro that runs through all the excel files in a folder and copies a set of data from each file in the new file. I am having trouble with some of those file containing links ...
-1
votes
0answers
22 views

Excel VBA programming [on hold]

One column has a 16 digit ID number. I need to be able to copy and paste that number into a cell and it will be able to tell me if it is duplicated. If it is duplicated the number of times it has been ...
-1
votes
1answer
40 views

How to sync same excel workbook between 2 computers on the same network

I need some help with this please. I have an input workbook where product data is entered, and an output workbook(Report) where this said data is copied into a single line using vba macros. The ...
0
votes
2answers
23 views

Advanced Forms in Word

I am looking to create a form in Word where the value selected in a combo box will determine the text in another section of the form. First, if I create a Combo Box in a Word document, how do I ...
1
vote
0answers
21 views

Excel VBA - Use string variable as input to Union Method

Somewhere in the Sheet called Sheet 2 I have the following: Click for image It uses the TEXTJOIN function to concatenate the values in Column A. The string in B100 is variable S (see the code). I'm ...
0
votes
0answers
23 views

Make Excel Spreadsheet Fill Page when Printed

I am attempting to print a spreadsheet that automatically fills the page utilizing all space available. The amount of rows varies, but the columns do not. The reason is that people hand write in the ...
0
votes
0answers
59 views

vba Relative Path from MS Access to Excel

Here, I read a piece of code written by Dave on September 12, 2016. I have this line of code that works well: sExcelWB = "D:\testing\" & "qry_task.xls" I have been trying the Relative Path codes ...
-1
votes
1answer
18 views

Creating a file/folder directory and loader with use of excel [on hold]

I want to select a parent folder, then for a code to work its way through the folders inside a the parent folder & create hyperlinks for the files. The aim is to have a directory interface on ...
0
votes
0answers
8 views

How to add checkbox to excel automatically?

Suppose I have three columns; Column A, Column B and column C. How to add checkbox using VBA automatically in column A if I put text in Column B (only) not Column C, and when I delete that text, ...
1
vote
2answers
24 views

Can Excel VBA call Macro in Different Macro Workbook

Can VBA code in an excel spreadsheet call a different XLSM Workbook file's Macro? I have a local XLSM that needs to call a method in a different XLSM file, how can that be done?
0
votes
0answers
23 views

Set Custom Path While Exporting in VBA

I am using this post's accepted answer for one my exports. Based on the answer, it saves my exported .csv file in my C:\Users\username\AppData\Roaming\Microsoft\Excel\XLSTART. However, I need this ...
0
votes
2answers
34 views

Auto Hide/Unhide all rows based on value in colum

I have "sheet2" in which data populates dependent upon what's entered into "sheet1". The data populated is either "N/A" or a particular statement. In sheet2 I'd like any rows with "N/A" in Column G ...
1
vote
1answer
53 views

Conditional defalt on data validation list

EDIT No. 2 *Ok, my previous articulations of my problem were, as pointed out, pretty rubbish. This edit, rephrases the question in a more straightforward manner, summarises the context and provides ...
-2
votes
1answer
38 views

Moving data from one sheet to another via a hyperlink

I've searched the existing questions and found similar questions and answers but none that meet my requirements. I have a spreadsheet where I wish to be able to click on links in one spreadsheet to ...
0
votes
2answers
25 views

Excel offset from two different workbook, create a copy of one without affecting the other

I am using two different workbooks the first one [Excel Data only] created as a databse and the second one [Invoice Template] created to create an invoice. When creating an invoice i am using offset ...
0
votes
0answers
20 views

Can't open VB editor in EXCEL 2016

I used to be able to open the VB editor in EXCEL, but suddenly I can't. I was in compatibility mode but have reset to normal mode. Other Workbook now have the same problem.
0
votes
1answer
22 views

How can I modify the “Applies To” property of a Cell's Conditional Formatting rule using VBA?

I'm attempting to use VBA to create a conditional formatting rule and apply it to multiple cells. I've attempted this is by creating the rules for one cell only and then editing the appliesto ...
1
vote
0answers
48 views

Defining a range within a filtered column in Excel

I am attempting to make a macro that I can use to automatically select all values within the filtered range of the column. Ideally I am trying to get this to work with 10 filter conditions (1-10), but ...
0
votes
0answers
15 views

when I save each invoice I get all the blank lines in the invoice showing up as well

I am creating a database for a friend of mine. on 2 sheets then I have an invoice list that calls data from the inventory list based on an item code ( using Vloolup). I then have a VBA formula which ...
0
votes
1answer
99 views

VBA CleanFileName and CleanUsedRange

I am having some issue with the following code. Whenever I run the vba code, the CleanFileName and CleanUsedRange code delete my Vlook formulas. Is there any way to use the CleanFileName and ...
-1
votes
0answers
28 views

VBA to copy and paste a formula on a set number of rows [on hold]

I'm trying to write a VBA code to copy and paste a formula on a set number of rows, but to move columns every time I run the macro. Here is what I've done so far, I basically need this to be ...
0
votes
0answers
36 views

How to rank two values based on the following criteria

I have the following two columns, Benefit and Cost scoring results, each of which are out of a hundred. I want to be able to order each row based on its ranking compared to each of the other row ...
0
votes
0answers
17 views

On Excel right click on Sheet tabs is disabled

For the past few days I am not able to right click on sheet-tabs in Excel and select move or copy. The right click menu is not coming up. It looks like it could be a VBA issue as MS support person did ...
0
votes
1answer
60 views

Display Show List when Value selected in Cell

]I would like a dashboard worksheet that has a text box listing the string value of a particular cell in each worksheet in a workbook, but only if that cell matches a specific value. Scenario: I have ...
0
votes
0answers
17 views

Excel form to read/write from linked .xlsx

I've inherited a partially complete project where a student developer is using excel as a database. Hes tried to separate the user interface (created with excel forms) and the "database" which is a ...
0
votes
0answers
12 views

Designing automated grid in Excel

I have a grid that is used to determine the size of a company expressed as a letter of the alphabet. At the top of the grid I have "Number of Staff" expressed in groups of "Up to 100", "100 -200", "...
0
votes
1answer
63 views

How to color only numbers and special characters in a Microsoft Excel cell

Is it possible to color only numbers and special characters of a cell (or column) by conditional formatting or some other similar method? I have created a book in Excel to organize my passwords (or ...
1
vote
2answers
41 views

Excel 2013: VBA to copy formula from one cell to the next

I need to copy a formula from Cell A3 to B3 in Excel, using a button to run below macro: Sub Copy() Range("A3").Select ActiveCell.Offset(0, 1).Formula = ActiveCell.Formula End Sub Then with ...
-1
votes
1answer
20 views

How to print multiple PDFs of graph controlled by dropdown list using VBA?

I have an Excel worksheet which generates a combination chart to show trend data on 49 manufacturing work cells. The chart source data is based on cells which contain a large number of formulas (...
0
votes
1answer
13 views

Is there a way to link workbook data without getting REF errors when a row is deleted?

I currently have two workbooks, workbook 1 and workbook 2. Workbook 1 - Sheet 1 is directly linking data to Workbook 2 - sheet 1. I am linking by inputting the below formula into workbook 2. ='[...
0
votes
0answers
12 views

Scheduled and Recurring Email using a template

My macro works but the email is not from my saved template. Private Sub Application_Reminder(ByVal Item As Object) Dim objMsg As MailItem Set objMsg = Application.CreateItemFromTemplate("C:\Users\...
0
votes
0answers
37 views

Word VBA: Document_open() macros execute on manual open but not when called with a keyboard shortcut

Thanks, @Albin...Sorry, I'm new. If I have a document with code in the Document_Open() section of the ThisDoc section of the document Project in VBA, the code works fine when I open the document ...
0
votes
1answer
30 views

Copying cell from one sheet to another without formatting

probably a simple one to your geniuses however I need a fresh pair of eyes as I've been on this a while and can't see my error. I'm merely wanting to copy the contents of a cell from one cell to ...
0
votes
1answer
45 views

Copying only certain cells from a row to another worksheet

I have a workbook that has a large number of sheets designed to help my team manage their workload more efficiently. When someone requests a job to be done, a row is added to a sheet called 'pending ...
0
votes
1answer
29 views

Input data from one workbook form into another workbooks worksheet

What I am trying to achieve: I have one workbook with an application form to request additional training. A person fills out all the cells on the form and clicks submit. I then want all the data ...
0
votes
2answers
26 views

ActiveCell.Value = Time vba without seconds

I have a "timesheet" macro for clock in and clock out times for employees to use at work. The macro I have is this: ActiveCell.Value = Time ActiveCell.NumberFormat = "h:mm AM/PM" It works well and ...
0
votes
1answer
53 views

Excel auto new sheet with column copy and today's date

I want to write a VBA routine that would "daily" create a new sheet give that new sheet a name of the form DD.MM.YY (with leading zeroes), based on today’s date (for example, 25.07.18) copy the ...
0
votes
0answers
21 views

WorkSheet_change event doesn't fire on pressing enter, but tab works on drop-down change

I have wrote code in worksheet_change event but this event doesn't fire when I press enter but It works well on pressing tab. I have drop-down in excel worksheet cell. Could someone please find ...
0
votes
1answer
29 views

Hotel software opens E-Mail Window in Outlook with generated text - how to change it automaticly to html or trigger a vba script?

My situation: A hotel managment software generates a text and opens a "New E-Mail" Window in Outlook with that text preset. However, I need the E-Mail to be in HTML format, apply some formatting and ...
1
vote
1answer
41 views

Auto attach a file to a specifc email template

Every morning i have to update a file with some data and then send it to people and its getting a bit laborious having to attach the same file over and over again each day. I have a template with the ...
0
votes
0answers
35 views

Filter outlook Sent Folder by last month and get the count

I've been trying to filter my outlook sent folder in Word to get the count of the total emails from last month. ' Connect to outlook Dim outlook As Object Dim NumEmails As Long Dim name_space As ...
0
votes
0answers
27 views

Extract distinct row values from a sheet to another sheet based on max dates per unique rows

I want to extract rows based on max date or max B per unique values of col A and col c. Doesn't matter if it is vba or excel formula. Help please. Old Sheet New Sheet [2
0
votes
1answer
39 views

How to use VBA .SaveAs by copying a number from a cell in the spreadsheet retaining a particular number format?

In Cell A1, I have the number (56,000), which is -56000 (negative fifty-six thousand), formatted as Accounting. However, whenever I use VBA to include that cell value in the filename, it saves it as "...
0
votes
1answer
63 views

Weird VLOOKUP issue in a macro heavy worksheet

I have quite a weird issue with a workbook I built that is very macro dependent. It centers around a simple VLOOKUP(). Currently my macro creates a line item on one sheet (Sheet A), then copies said ...
1
vote
0answers
61 views

Prevent losing a digital Signature when a document is saved?

The question What is an effective work-around to prevent a Digital Signature dropping from a file when it's saved? Or, What would be an efficient way to replicate saving data to a Macro Enabled MS ...
0
votes
1answer
23 views

Copy data from one sheet's cell to multiple cells in another sheet

I have this database where I store sales. I can find particular sales by filtering. I would like to have a button that then regenerates the sales as "receipts" in another sheet. This is my code for ...
0
votes
1answer
56 views

Error sending automated email

I have a shared workbook which has a column that uses a data validation list. If YES is selected I'd like it to send an email to a certain department to prompt them to look at the workbook. I've ...
2
votes
1answer
109 views

Modify VB code in MS Word to change image text-wrapping

In this code for image resizing: Sub resize() Dim i As Long With ActiveDocument For i = 1 To .InlineShapes.Count With .InlineShapes(i) .ScaleHeight = 50 .ScaleWidth =...