Questions tagged [vba]

0 votes
1 replies
Loop Through Files - File not found
So, I have this code that I found here: https://stackoverflow.com/a/10382861 And when I first found it, I modified it to actually open the files...
asked 4 months ago
0 votes
1 replies
How to determine the length of a particular array
Determine the length of a particular array. Have tried several variations of Value but no joy. Within a macro I've tried: Range("BB4").Select...
asked 4 months ago
0 votes
1 replies
Paste array to certain rows and column within table
I wrote a function to write the contents of a 2-dimensional array to an existing table. Nothing will be removed from the table. The new rows must...
asked 4 months ago
-1 votes
1 replies
Generate passwords
I need generate passwords that do not repeat and do not have the same consecutive number, in addition to having a length of 8 digits, only number...
asked 4 months ago
-1 votes
0 replies
Is there a way to use vba and solver to recalculate an iterative worksheet (circular references) to reach target values for 10 dependent variables?
I have a worksheet with a series of iterative calculations that produce ten component variables whose sum needs to match a target demand at a fut...
asked 4 months ago
1 votes
1 replies
How to modify bullets using an Excel macro?
Quick question: How do you format the actual bullet point itself? The bullet points all still appear as stars instead of a normal black circle...
asked 4 months ago
1 votes
1 replies
I need an Outlook macro that will monitor a specific folder (not the default inbox) so it fires another macro when items are added
I created a pst file called All Inbox and have rules to move all email from all other accounts into its Inbox. I have a macro that runs all those...
asked 4 months ago
-1 votes
0 replies
how can we retrieve non contiguous cells from three workbooks and display it in main workbooks
I have a master workbook that display a monthly Absences for shift employees. The workbook have four fields:Date(cell:A1),Total Rostered(cell:B1)...
asked 4 months ago
1 votes
2 replies
Storing the first value in a sequence and use the stored values where the condition meets
I have this table and the VBA code has to fetch Value from Product where the Primary value is Yes. But, Value has to be the First Value in the Se...
asked 4 months ago
0 votes
0 replies
how to add a formula to each cell in a column if another column has a value
i have two dates. column G has start date and column H has end date. Column P has the amount of days between the two dates."Formula in Vba". the...
asked 4 months ago
0 votes
2 replies
Worksheet Event Not Firing
My basic worksheet event code is not working. I have the following code included in my Sheet4 workbook (where I want it to run): Private Sub Wo...
asked 4 months ago
1 votes
0 replies
How do I create a new form instance whose name I have in a string? [duplicate]
Code to create new form instance of a closed form using form name I want to replace the long Select Case list with a variable. Full code of mod...
asked 4 months ago
0 votes
1 replies
compilation error, Sub or Function not defined
Currently realising a project for my company to highlight anomalies in orders, I wrote this VBA code in order to compare status of orders and a d...
asked 4 months ago
1 votes
1 replies
Populate Combobox with Two Text Fields from an Array
I'm trying to get values from 2 cells in an array to populate the text field of a combobox on a userform. The values in the array look like this:...
asked 4 months ago
0 votes
1 replies
How do I set the value of a do while inner loop, nested in a for loop?
I have a report that downloads from a client's SharePoint. The report varies in length depending on the site and time range I am running it for....
asked 4 months ago
0 votes
0 replies
Trying to hide rows that are not filled in and have values in them, can do the opposite but stumped
I have a vba macro that hides an entire row if there is a "1" and an highlighted cells. But I'm trying to do the opposite. Hide rows that have a...
asked 4 months ago
0 votes
1 replies
Can't Ctrl+Z (undo) with ComboBox referring to dynamic list with named range, rename to array? How?
I have a ComboBox whose list refers to a named range that creates a dynamic list based on the matches with the linked text to the ComboBox (linke...
asked 4 months ago
-2 votes
1 replies
Move files to folders
I have files and folders with same name how i can move this files to folder has same name. -2 First I doubt that you have files and folde...
vba
asked 4 months ago
0 votes
1 replies
Is there a way to send a file regardless of name as long as it has the csv extension?
I will periodically be sending csv files to a client. I am wondering if there is a way to send any file within a folder as long as it has the csv...
asked 4 months ago
0 votes
1 replies
Using worksheet function countif for filtered cells
I am using the code below to loop through a filtered column and collect each name of sales person as it loops through; I am using the SpecialCell...
asked 4 months ago
-3 votes
0 replies
Combine rows with same ID into one row
Copy multiple rows with identical IDs in one Excel sheet to a single row in another Excel sheet. For instance ID Name school Grade...
asked 4 months ago
0 votes
1 replies
Workbook reference via VBA doesn't accept variable
I am trying to set up references to other workbooks, whereby the location is static: G:\XY\XY\[Workbook2019.xlsx]2019-04'!C1 Since these refere...
asked 4 months ago
0 votes
0 replies
Why do we need to use vbObjectError constant when raising user-defined errors in VBA?
Microsoft Visual Basic for Applications 7.1; Version 1088 I created a custom error handler by following online tutorials and I've been usin...
asked 4 months ago
0 votes
1 replies
vba is there a way to compare values from two different sheets or files?
I find some difficulties when I try to compare values of two different Workbooks. The code has to delete the rows that do not follow the if condi...
asked 4 months ago
0 votes
0 replies
Load contents of .rtf file into RichTextBox Control
I am trying to build an Excel application with UserForms. In a UserForm, I've successfully added RichTextBoxes. I have also successfully coded a...
asked 4 months ago