VBA stands for Visual Basic for Applications, a subset of Visual Basic used in all Microsoft Office Applications. Consider tagging your question with the application as well as [VBA]

learn more… | top users | synonyms

1
vote
1answer
383 views

How to check data exists or not in array and add items to array using VBA

I always write data 【AAA, BBB, CCC】into CSV file. I would like to also write other data (eg:DDD) if there is in text file. An array: arr = Array("AAA", "BBB", "CCC") Text File(Read): AAA BBB ...
0
votes
0answers
32 views

How to group data of text file using VBA

I would like to develop following flow. What is the best way of doing this? Text File(Read) AAA BBB CCC BBB CCC AAA AAA CSV File(Write) AAA, BBB, CCC
0
votes
1answer
695 views

How to read from second line of text file using vba

I would like to read from the second line of a text file to write its data into a CSV file. What is the best way of doing this? Open InputFile For Input As #1 Open OutputFile For Output As #2 ...
0
votes
1answer
192 views

Excel 2003 file with Visual Basic is crashing Excel 2013

I have 2003 Excel file with Visual Basics code in it. It works fine in versions up through Excel 2010, but it does not work in Excel 2013. Excel crashes whenever VB functionality is used. I have ...
1
vote
0answers
82 views

Is there a macro to filter table by some list elements?

I have a table with entries based on a list and I used a macro I found somewhere to be able to add/remove multiple elements from the list to one cell, let me show you an example: TEST TABLE test1 ...
0
votes
1answer
84 views

How to format time with decimal places with excel vba?

I'm trying to write a macro that takes a time value in seconds (decimal) and converts it to mm:ss.00 format (two decimal places.) The closest I've come is this: Application.Text((1.23 / 86400), ...
0
votes
1answer
262 views

Create Sequence Diagram Using VBA

I would like to create sequence diagram with data of reading text file. Moreover I want to output that diagram in Excel. Using Language is Excel VBA. What is the best way of doing this?
0
votes
0answers
125 views

Excel VBA Chart.Export File size too big. How to resize the exported PNG file

I have recently taken over this process where I will need to manually copy a range from an excel spreadsheet asPicture, and paste it in a email body as bitmap. This is so that the recipients of the ...
0
votes
2answers
86 views

How to replace at a specific position in a string using vba

I would to replace one value in a string of text file. If I try the replace that value with Replace method, all same values get replaced. I just want to replace the one at specific position in the ...
0
votes
0answers
26 views

how to toggle values and look for a lable ms Access 2010

Function ToggleLabels(ByVal lblName As String, lblStyle As Integer) Dim objL As Label objL.Name = lblName If objL.BackStyle = 0 Then objL.Caption = "" objL.BackStyle = 1 ...
0
votes
0answers
103 views

How to automate transfer of specific data in cells to another workbook in Excel

I admit to not being very technical and my limit up to now has been using paste links to connect data between sheets. I now have a requirement I cannot figure out. I have 2 workbooks I wish to ...
0
votes
1answer
142 views

How to know first line or not of text file using vba

I would like to know first line or not when reading a text file to edit its data. Because I don't want to update that data at other lines. I want to branch my code at the position marked using a β˜…. ...
0
votes
1answer
575 views

How to write text file without [0D 0A(VBCRLF)] at the End using vba

I am developing process that copy text file and edit text file content according to Excel data by using FileSystemObject. Although Line Break Code of original text file is [0A(VBLF)], after ...
0
votes
2answers
142 views

Get value between two commas using VBA

I want to edit a text file by using Excel data. The text file has the form: Data1, Number1, Number2, ..., etc. I want to get Number1 and replace sum value(Number1+excel data). Number2 is also the ...
0
votes
0answers
42 views

how to develop to display defined button name only at OpenFileDialogBox using excel vba

I am developing Select File Process. There is no problem that open FileDialog and select File. But there is a problem dealing with button name. Although I defined button name as "Select", the time ...
1
vote
2answers
109 views

VBA macro in excel 2010 32 Bit mode

I have a excel sheet which saved using Excel 2010 64 Bit. It has a code as follows Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 1 And Target.Column = 17 Then Dim iRet As ...
1
vote
1answer
126 views

How to access the formatted text within an Excel cell with VBA

I have embedded formatting within an excel column. For example, a cell might contain some (but not all) italicised words. The .Value, .Value2 and .Text properties seem to strip any formattting. I ...
1
vote
0answers
28 views

VBA to sequentially number rows in column [duplicate]

I want to number sequentially all cells on sheet4 starting at A2 (starts at 0) for 26000 cells in the A column I have been trying the get the below code to work but need help. Sheet4.Range("A2") = 0 ...
0
votes
0answers
189 views

Using VBA to sort cells to match the values in an adjacent column

What I would like to do is write a macro that sorts the values in the range B3:D9 on the left side of the linked image to produce the intended result (shown on the right side). For every value in ...
0
votes
0answers
16 views

Shortcut to bypass all animations and go to next slide in Powerpoint? [duplicate]

Is there a shortcut in Powerpoint instead of using the control panel or right-click menu to bypass animations and go straight to next slide?
1
vote
0answers
79 views

How can I edit this macro to loop through the results?

I am trying to select one cell to the left and to the right of a cell I have found by it's value. I am new at writing VBA macros and have hacked together the following script from a few different ...
0
votes
2answers
56 views

How to write data after changing Excel column order to a text file in VBA

I would like to write to a text file from Excel, but the data order is different from the column order in Excel. For Example: Excel Column : Col1, Col2, 𝐂𝐨π₯πŸ‘, Col4, 𝐂𝐨π₯πŸ“ Text file ...
2
votes
3answers
4k views

How do I install Visual Basic for Applications 2013 in Office 365?

I've recently taken out a subscription to Office 365 and have downloaded the desktop office programs. However, I'm trying to install an EPM excel addin and it's complaining that it needs "Microsoft ...
0
votes
0answers
42 views

VBA Editor on F8 shows outlook insted of Step Into

Excel VBA Editor on F8 shows Outlook insted of Step Into. I don`t use it and it wants me to add my e-mail configuration every time. In other applications F8 works properly. What am I doing wrong? ...
0
votes
2answers
1k views

How to read data from Excel Sheet using Excel VBA 2010

While in one Excel sheet I would like to read data from another Excel sheet and write it to a text file. Example of the first sheet: Sheet_Name File_Name Start_Line End_Line Sheet1 ...
-1
votes
1answer
29 views

Need Macro to perform formula based on cell not number

I am working on a budget workbook and in column I (I5-I1135) I have numbers that I need to upon prompt (such as CTRL C) have the numbers divide by 10 then multiply by 12.. Example: cell I5 has ...
0
votes
0answers
43 views

Excel Macro looping

I used this macro and it worked fine, but I needed a little bit more. I had to change LookAt:=xlWhole to LookAt:=xlPart and add the color formatting. Now, when I select a column, the Macro appears ...
2
votes
1answer
129 views

excel vba: to export multiple excel sheet into its designated jpg file

I am working on an excel vba command to export multiple excel sheet to its designated jpg file. I have 16 worksheet in one excel workbook and it would be best to export each sheet into jpg format. ...
0
votes
1answer
269 views

Excel formulas for budgeting sheet (or VBA code)

I'm (an amateur) and I'm creating a sheet to help me with Budgeting. I've got bills that I can enter, but that come at a variety of different intervals. I'd love it if I could enter the total from ...
0
votes
0answers
64 views

How to keep track of manual entries each day?

I am trying to keep track of manual entries but do not know the correct method of doing this. Should it be done using vba or by using formulas? I have spreadsheet you can view so you can see what I am ...
0
votes
1answer
268 views

Excel VBA: Rnd() method isn't random enough

I'm using Excel and VBA to simulate a large number of dice rolls. The problem I'm having is after a certain period of time, the rolls start repeating, and I start getting results that are anything ...
1
vote
0answers
117 views

Add-in vs sharing macro file in Excel VBA [closed]

I am writing a Macro that I want my team members to have access to on their machines so we can use it to upload some monthly data stored on some space accessible on the Network. This is my first macro ...
0
votes
1answer
115 views

Excel: VBA integral code

Just wanted to know whether there exists a well-known technique to calculate an integral in Excel. I've already read about implementing Trapezoid rule but before implementing this technique I wanted ...
0
votes
0answers
146 views

PowerPoint avoid animation completion on click & advance slide or start new one

Scenario I have PowerPoint 2010 On the "Transitions" tab the "Advance Slide On Mouse Click" check box is checked. I have a long, slow, timed, non-repeating animation working in the background of the ...
0
votes
0answers
175 views

How do I change dates in a pivot table using VBA?

How do I automate the checking/unchecking of dates in a pivot table? I have a pivot table from which I need to extract data based on a date range (last seven days, previous seven days). The ...
0
votes
2answers
200 views

How would I write a macro in Outlook 2010 to set all folder properties to “see all items”?

How would I write a macro to set all folder properties to "see all items"? I have hundreds of folders and subfolders and need to set the folders to see all items and I can't figure out how to write a ...
0
votes
1answer
2k views

Excel 2010: dynamic update of drop down list based upon datasource validation worksheet changes

I have one worksheet for setting up the data sources of multiple data validation lists. in other words, I'm using this worksheet to provide drop down lists to multiple other worksheets. I need to ...
0
votes
1answer
270 views

Offset the tickmarks of a secondary axis

I would like to offset the tickmarks of a secondary axis in excel WITHOUT changing the minimum. Here is a very complicated VBA class that apparently solves the issue but I would like a solution that ...
1
vote
0answers
112 views

Incrementing ticket numbers each time I print

I have an excel sheet to print a set of 4 tickets per page which we use for stock takes. I found code that prints one number per page. Being a Visual Basic for Applications novice, I was unable to ...
0
votes
1answer
239 views

How to launch a dialog box with fill-in-fields in a Powerpoint 2010/2013 document?

I would like to set a PPT presentation which launches a dialog box at the opening of the document where I could directly fill in some fields with information (such as the name of my client, the name ...
0
votes
0answers
39 views

Change Default Email Delay - Adding Marcro to the Correct Toolbar in a NEW Message

Please refer to this article: Outlook: Change default email delay for "Do not deliver before" feature But, how do I add this macro to the toolbar for a new email message?? I can add it to ...
1
vote
2answers
710 views

Automatically save attachments from mail on a network drive

Every morning I receive an automatically generated e-mail from a server, it includes a spreadsheet attachment. I made a rule in outlook that captures these emails. Now, I would like to make a macro ...
0
votes
0answers
139 views

Excel VBA: Is it quicker to refresh all PivotTable caches than all PivotTables?

I'm new to all this VBA/macro stuff, and while I was looking for code to refresh all pivot tables in my workbook, I came across some information about PivotTable caches. I have ~14 PivotTables in ...
0
votes
0answers
43 views

Excel: Automatic data transfer when excel workbook updated

I'm wanting excel 2007 to automatically identify and transfer the new rows of data from one teams spreadsheet to our own. Is this possible within excel? I envisage a macro would be able to compare ...
0
votes
1answer
88 views

Excel 2010 - Show cell contents - wrong number appearance

I was trying to create a simple function in Excel VBA editor. When I click on a cell within the certain range, I want to copy its value into another cell I have set. Private Sub ...
0
votes
1answer
160 views

How to select all ActiveX objects in an area using a mouse in Excel?

Because of this problem with ActiveX objects changing size, I am not grouping my ActiveX objects in my Excel worksheet. Grouping them causes my solution hack to not work which is quite annoying. ...
-1
votes
1answer
126 views

Excel 2010 VBA on-start macro execution - Error

I have been trying to create a macro to be executed every time I open the document. I tried to use the Open event, but it does not seem to be working. The code is below: Private Sub Workbook_Open() ...
0
votes
1answer
337 views

Excel 2010 VBA - Make variable hold value after file is closed

Just like the title suggests, I am looking for a way to make a variable hold its value even after the Excel 2010 file containing the VBA code is closed, and retrieve it with its last value, the next ...
2
votes
1answer
609 views

VBA to move specific data from one column to another

I've tried requesting help with this before but have received no helpful responses. I need a Macro/VBA that moves any word in red from column A into column C as a list. However if the same word is ...
0
votes
1answer
116 views

Insert blank row on two conditions

I have a spreadsheet with a large number of rows. There are two rows grouped together (for each customer). In column A, the first row has an account number. The second row should be blank. The ...