Skip to main content

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 for entire solutions (please give me the code / how to do this and this with VBA) are off topic and will be closed as too broad.

0 votes
1 answer
26 views

Excel Parent-Child Array to identify and move children not working?

I use Excel 2019 on Windows. I am trying to create a parent-child array that iterates through each row in the worksheet "Data". The parent rows are identified where the value in column B ...
Kenny's user avatar
  • 49
2 votes
1 answer
78 views

Loop over excel cells using for loop when cells are selected using CTRL

I am trying to loop over cells which are not selected in sequence, rather they are selected using mouse and CTRL. When I use for each loop, then it works, but when I try for next then the result is ...
Veki's user avatar
  • 183
0 votes
0 answers
29 views

VBA timer stops running when using another Excel workbook

I'm using the following VBA script for a countdown timer in Excel. It works well, except that the timer stops running when I switch to another Excel workbook - is there a way to keep it running in the ...
Matthew Dunzello's user avatar
0 votes
0 answers
12 views

VBA: Row being pasted needs to all be in the same row, not look at last blank in that column

The VBA code I have currently pastes data into the last blank cell "End (x1Up). But in column C, there is often blank cells, so I need it to look column As last blank to know where it is pasting. ...
Stewy's user avatar
  • 1
0 votes
0 answers
28 views

ByVal target range returned is in unexpected format

The target.address variable that is passed, is $127:$127. In terms of range, what does it mean? Private Sub Worksheet_Change(ByVal target As Excel.Range) If r Is Nothing Then Set r = New Revenues ...
TechFanDan's user avatar
0 votes
0 answers
36 views

It takes a long time to load a vb.net program from a vba shell and we do it multiple times. Is there a way to speed this up?

I have an accounting application that runs a stripped down version of VBA. When I perform more indepth functions to a data entry, I will load a VB.net (WIndows forms) program sending relevant ...
Arnie's user avatar
  • 1
0 votes
0 answers
29 views

Excel VBA to list Sheets in selected Workbook and copy listed Sheets to end of Main Workbook

I have a working VBA code present in a Main Workbook which is designed to browse and select Another Workbook and generate a list of names of all Worksheets present in the selected book in the Main ...
Shuaib Dawe's user avatar
0 votes
1 answer
77 views

I want my macro to find all words (in a certain unformatted document) that start with a certain string ("yyy") give these words a different formatting

I want to find all words (in a certain unformatted document) that start with a certain string ("yyy") and give these words a different formatting. The following VBA-code executes once and ...
Bert van der Saag's user avatar
0 votes
0 answers
33 views

Excel - Highlight Row of Selected cell

I want to highlight the row of the selected cell in any active workbook. How can I achieve my goal? I have experiences in highlighting selected row by using conditional formatting and change event. In ...
Jill's user avatar
  • 1
2 votes
1 answer
180 views

Incrementing number in a row each time I print

I need to increment a value by 1 in K1 each time I print sheet number 1, 2, etc. I used to have code that was saved and was working fine, but I lost it when I formatted the PC. It used to ask me the ...
Shiv's user avatar
  • 33
0 votes
0 answers
46 views

How to append multiple .csv into one .csv (not multiple sheets .xlsx)?

Looking to do something like this: Is there a script that can do that? I've tried searching and the scripts are either 404'ed or they merge them into a single .xlsx with multiple sheets.
Michael L's user avatar
0 votes
0 answers
36 views

Using VBA-JSON to retrieve the value of a key that is in an array

I'm trying to use VBA-JSON to parse a dump from Wiktionary. I gathered from the example here that if the key you are interested is in an array, you specify the index in parentheses starting from 1, ...
culp's user avatar
  • 35
0 votes
0 answers
11 views

Why isn't xlPasteFormat carrying conditional formatting to new workbook?

I"m trying to take a workbook with formulas for calculation and export it to a workbook that is value only. The use case is a scorecard for different items, so having the overall scores color ...
Patzy's user avatar
  • 1
1 vote
1 answer
35 views

Convert input box to pick column into number to apply to range

I would like to use the inputBox to pick a column by user and apply it to run on each row index but haven't had a luck. Its saying type mismatch. A lot of things to learn and lacking experience in ...
DongM's user avatar
  • 41
0 votes
0 answers
56 views

VBA - Search Website, Return Class Element Value

I've created a VBA Script to return a value from a class element value on a website, However this is not working in this particular element. I believe this may be due to the website requiring the page ...
nobody's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
251