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

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

1
vote
0answers
12 views

Excel filter vanishes after change in sheet

I have a excel-file with multiple sheets. Sheet1 (Lagerliste) holds a bunch of logistics-data. Mainly: WHAT is WHERE In a seperate sheet I want to filter all lines containing a certain value (...
0
votes
0answers
12 views

Excel macro works (except) for one cell

I have a macro that is currently working but not 100% and was wondering if someone could kindly review it. The issue is when a number is entered in cell H24 the macro does not do the calculation like ...
0
votes
2answers
82 views

count cells based on value if consecutive values same or more than 6 cells

In Microsoft Excel 2013, I need to count the number of cells across coloumns - but only if 6 consecutive cells have the same value (ignore if the value is in less than 6 consecutive cells). e.g. ...
0
votes
1answer
18 views

Excel VBA Runtime error 1004 Application-defined or object-defined error

Upon clicking run, I kept getting the runtime error 1004 and the codes in brackets below gets highlighted. Any one can help me with this Private Sub Add_Click() Sheet4.Activate (Range("A1").End(...
0
votes
1answer
47 views

Data is not copied in the same row (multiple workbooks to master sheet)

I have a VBA routine to copy selected cells from multiple workbooks to one master file. But it has the problem that, there are possibilities that one or more of the source (input) workbooks will ...
0
votes
1answer
12 views

Word Macro: Read number as a word rather than separate characters

I a teacher and am creating a macro to look for common errors in my students' papers. For example, I build a macro to look for the word "profit". If it is found, it then looks at the previous word. ...
0
votes
0answers
16 views

Runtime error 1004: application defined or object defined error

The error is on Wdest.Cells(dcodecount,4).Value = dloc I don't understand why it does not work. Can someone help me with an explanation why it does not work? Thank you Sub Filterdtag() Dim address ...
0
votes
0answers
16 views

Write Dates into array / Stop loop when reaching empty cell / Excel VBA

I am fairly new/coming back to VBA after ~10 years of Hiatus. Now I am faced with the below Problem: I would like to write Dates from a column in worksheet1 (say Colum B) into an Array until I reach ...
-6
votes
0answers
29 views

Excel scripting dictionary

I would like to code for following data in "data" worksheet with vba scripting dictionary, with names as key and marks as values, also output dictionary data to "output" worksheet of same workbook. | ...
0
votes
0answers
13 views

Excel Code to find corresponding value to a cell [closed]

I would like to create a code in excel that allows me to look for all the corresponding values in other columns for the term that I type in. For instance, [the following image] shows a column of ...
0
votes
1answer
23 views

How to reference a shape by name and what else can be used in .Select?

I use MS Excel 2007 My question is in two parts I have a form option button called "Option1" How do I refer to that button in other macros? I know that I can select it using: ActiveSheet.Shapes("...
0
votes
0answers
9 views

Convert tracked changes to highlighted (continued)

is there a line we could add to the following VBA routine in order to highlight one letter before and one letter after all deleted text, so that when all changes are accepted, we can still visualize ...
0
votes
2answers
61 views

Tell a macro to check if object exists and if yes do A. but if no then do B.?

I use MS Excel 2007. I have the following code in a macro that creates two Option Buttons (not active X) into Cell B25. Range("B25").Select ActiveSheet.OptionButtons.Add(129.75, 540, 24, 20.25)....
0
votes
0answers
24 views

Fixing AS400 error: “Someone else is working in 'J:\AS400 Automation\tk.csv' right now. Please try again later.”

I was able to create a simple command in AS400 by recording some macros from AS400 then adding some codes thru the .ebs file. It was working fine when I was using it but when it was applied to 10 ...
1
vote
0answers
12 views

VBA to check which stylesheet is loaded in Word

I have a small macro to change styles automatically, but it won't work unless the right style sheet is selected. At the moment, it looks like this: ActiveDocument.ApplyQuickStyleSet2 ("Anthology") '...

15 30 50 per page