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.

learn more… | top users | synonyms

-1
votes
0answers
11 views

vlookup - Is it possible to use vlookup to pull specific info like this?

I am trying to pull the following from each group of Numbers - CHG000509443 05-16-2016 22:48:41 for the Requested CHG000509443 05-17-2016 13:14:35 for the Approved Note 1 - It is always the first ...
-1
votes
0answers
21 views

Vba Excel programming

Columns("R:R").Select Selection.AutoFilter ActiveSheet.Range("$R$1:$R$1000").AutoFilter Field:=1, Criteria1:=RGB(255, 0 , 0), Operator:=xlFilterFontColor Cells.Select ...
1
vote
0answers
25 views

Excel VBA: How can I run code when any check box value changes in a Userform?

How can I run code when any check box value changes in a Userform? I am attempting to use a class module but the code is acting in a strange way that I don't understand. The code will only recognize ...
1
vote
0answers
13 views

How to add data vertically while xtracting tables from web page to excel

My code Public Sub Raju() Dim alertTime As Date alertTime = Now + TimeValue("0:05:00") ' ' mymacro Macro ' Dim ws As Worksheet Set ws = Worksheets("Sheet1") ...
-1
votes
0answers
16 views

Excel Macro to add rows until today's date and update following columns accordingly

I got an excell sheet with 3 worksheets that I update like every 2-3 days manually by dropping down the date column and it automatically updates the columns based on the date. For example: Let's say ...
-1
votes
0answers
27 views

Extract data from webpage using macro and save in excel

I am extracting live data from web page and save as csv using Application.OnTime Now + TimeValue("0:10:00") & ActiveWorkbook.SaveAs........ .csv Now i want to update and save all data in one ...
-2
votes
1answer
27 views

Simple excel macro and editing VBA, what changes do I need

I have a macro that I use from time to time. It successfully deletes the columns I want it too but it doesnt sort the columns as I want. When I debug the VBA I see it references the original excel ...
0
votes
1answer
7 views

Accessing macro function for all documents

I have created a macro function as: Sub updateFontCC() Dim doc As Document Set doc = ActiveDocument Dim i As Integer For i = 1 To doc.Range.Characters.Count If ...
-1
votes
1answer
52 views

Excel 2013 VBA script needed for [on hold]

I have several cells that have a string of text that are partially Bold and partially NotBold. I need to delete the Bold portion of the Text in the Cells Example: lname1, fname1email1@email.com ...
-3
votes
0answers
9 views

Excel 2010 Macros - Automation Error [duplicate]

When I upgraded to windows 10, a few macros I use in excel 2010 seem to have broken. They crash immediately when I run them and I receive an "automation error". They do not reference any outside ...
3
votes
1answer
37 views

Sorting data without mixing rows

I have three sheets. First sheet renamed General: Dave Henderson 21/05/2014 Elton Rus 22/06/2014 John Smith 20/05/2015 Second sheet renamed ...
2
votes
2answers
44 views

Excel 2010 Range.FormulaArray using Range.Replace

I'm trying to automate some daily work where i use an INDEX()+MATCH() array formula to grab some data from different workbooks into one 'master' workbook. Manually this works as intended, but now I ...
1
vote
1answer
37 views

How to save specific attachment with date stamp from outlook inbox to specific folder?

Every morning I receive an email containing 3 files: "Daily MILH Checks e.xls" "Daily Unit Linked .pdf" "Daily Unit Linked.xls" That is 2x .xls and a PDF. File names never change. The email comes ...
-2
votes
1answer
28 views

VBA Macro help needed [closed]

I have two files , each file i have a column called subsystems. i need to check if my file A subsystems are there in File B.. this i can do with the help of Vlookup, but the in each single cell i have ...
0
votes
0answers
32 views

Create multiple files based on one column of master sheet in Excel and copy paste information, Do the same for other tabs

Title does gives me suggestion for the questions which already might have an answer but they, Don't i have tried some modification to the code but they do not seem to agree. Here is my problem. I have ...
0
votes
1answer
15 views

Deleting pictures from slides since last save

Please bear with me as I explain, hopefully succinctly, my question. I have a user form that, among other things, allows the user to insert a picture into a subset of sets in the project [i.e., slides ...
4
votes
1answer
512 views

MS Word: How to remove all tables?

I need to run text-check program on my doc (Grammarly), and I need to remove all the tables. How can I do it? I find ...
-2
votes
0answers
22 views

Why data is getting copied in the same row?

Found this coding online and tried to use it for one of my workbook. This is not the exact coding as I needed to tweak as per my data.When I click on the button(Macro) 1st time it's correctly moving ...
0
votes
0answers
27 views

MS Word Macro to change string to Numbers in long documents?

I am as beginner as it gets with VBA and macro. I am looking to record a macro for MS Word documents that converts string to number. For example the document will have like (one thousand and four) or ...
0
votes
1answer
36 views

How to express a lone “\” in a file path in VBA?

I'm using a VBA script to save a file titled "month-day-hour-minute" inside of a folder titled "month-year" Anyways, excel doesn't like my code, ActiveWorkbook.SaveAs "C:\Users\" & ...
0
votes
1answer
21 views

Read file with multiple end-of-file flags

I have a pipe delimited file that was exported from server update. There are approximately 134 million records. I am using excel to import a small number of records (1,000 - 10,000) to explore the ...
0
votes
2answers
25 views

Quickly adding a category to a message

This may sound stupid but solving the problem would save me a lot of time. I am big on using categories (in place of folders, pretty much like labeling an email under Gmail), and more often than not I ...
-1
votes
0answers
33 views

Pass Credentials To ODBC Connection From VBA [on hold]

I have created an ODBC connection with a embedded SQL Query in my Excel 2013 workbook. Opposed to setting up the DSN on each PC that will run this, is there a way to pass the DSN Name, username and ...
-2
votes
0answers
20 views

Excel VBA - Combining daily data into monthly data [closed]

I am very new to VBA. So, my problem is that each day I have a file containing a list of products (with their respective code) with their total volume sold and the value of each product sold ($). I ...
0
votes
1answer
40 views

Moving certain Files with VBA

I am attempting to move all our daily files from a listing in excel. Column D has the Source, D:\Hard drive\Lee’s Hard Drive\My Documents\WBD052U_PRINT01*.txt Column E has Destination, ...
1
vote
0answers
43 views

How to put name and registration number in a form

I'm creating a database which stores client related information, in which there are two tables:   A. Client registration   B. Work done. So I have created 2 forms:   a. ...
0
votes
1answer
29 views

Using Find and Offset to create a dynamic range [closed]

I am trying to build some code that will sort, search, and copy data from a data set that is ever changing. I think I need to define a variable then have the coded find the coordinates for the ...
0
votes
0answers
13 views

Unique cell controlling the filter search of many pivot tables

I have many pivot tables coming from many different data source. On each pivot table is an item "NAME". Here is an example of the data "NAME" contains: Apple Corp Apple GmbH Apple Ltd Orange Corp ...
1
vote
1answer
81 views

VBA Solution: Microsoft Excel/PowerPoint rename active file, choose folder to save in desire location and delete old version

I am looking for a VBA solution for doing simultaneous task such as rename active file, choose folder where to save the renamed file and delete old version of file. "Save as" dialogue allow the first ...
1
vote
1answer
41 views

Get the Guid (not the entry ID) of an Outlook Message

As mentioned in this post, it is possible to grab the entryID from Outlook messages. But the problem is if theses messages are moved to another folder, the ID changes. So, I guess I need the GUID, ...
-1
votes
2answers
35 views

Appending text to textfile getting weird characters?

After successfully appending text to a text file, I'm getting weird characters, is it because I'm not setting the correct format? Here's the code I've tried: Dim fso As Object Dim Msg As string Msg = ...
0
votes
1answer
36 views

Open text file and append new text?

I have a text that I create and then later want to append text to it. But I'm getting a error: Invalid procedure call or argument. Dim fso As Object Set fso = ...
0
votes
0answers
33 views

runtime error 52 bad file name or number when trying to open text file

fPath = "\\teams\Shared Documents\" Filename = "TEST.txt" InputFile = fPath & Filename FileNum = FreeFile Open InputFile For Binary As #FileNum '---- here user gets error 52 User gets "runtime ...
-1
votes
0answers
31 views

Save error handling message to text file?

I want to catch any type of error and save it as a text file to view later. My problem is, it is saving the file as "workbook.xlsm" and not a text file. Here's my error handling: public sub ...
0
votes
1answer
69 views

VBA file copy based on list to specific directory issue

I am attempting to copy a file with names from an excel list and copy them to a specific directory using VBA. I am using rizvisa1's code from ...
0
votes
1answer
23 views

How to get a cell value's integer character only from worksheet formula?

Is there a worksheet formula that will return the cell value's integer character only? For example, the cell value is "500+", I want to return the value "500". I know there are functions that will ...
0
votes
0answers
19 views

Keyboard Shortcut to Toggle Between Modules in Excel VBA Editor

I am working with multiple modules in Excel's Visual Basic editor. Is there a shortcut to toggle between different modules?
-1
votes
0answers
23 views

Excel macro or VBA script to create rows from columns

I have a monthly project time spreadsheet which lists each project as a separate row, and each day for the month across as a column, i.e.: I would like to create a macro or VBA script which will: ...
-1
votes
0answers
22 views

Average of range error checks

When I click a checkbox event, this sub will run and put the formula in range b25. thing is, I want to check each row of that range to see if some criteria meets the requirements. One of the ...
-1
votes
2answers
101 views

Excel: How to compare two text strings and flag the ones

I have a huge file that is similar to the one below. I'd like to be able to compare the group of words in column A with the group of words in column B and get "No Match", "Exact Match" or "Partial ...
0
votes
0answers
13 views

Access 2010: Database cannot be opened because the VBA project cannot be read

I used a simple software made with access on windows 8 s.o. with accde extension After formatted pc and installed windows 7, I can't run software because "Access 2010: Database cannot be opened ...
0
votes
3answers
46 views

How to optimize VBA macro

I need your help optimizing this macro in Excel. I'm using it to generate data for labels for chemotherapy drugs in our hospital. The macro works fine right now, but sometimes it takes a long time to ...
0
votes
0answers
24 views

Anyway to put workbook activate and deactivate in the worksheet object?

Is there anyway to put the workbook/worksheet activate/deactivate sub routine into the sheet of the worksheet rather then having it on the "ThisWorkbook" section? I have a form that I want to ...
0
votes
1answer
79 views

Excel VBA - Run Time Automation Error

I have this below VBA code (pretty common found on this site itself as well as other places on the net to find SHA hash in VBA) that works just fine in Excel 2013 on Windows 7 32. However the same ...
1
vote
2answers
26 views

I'm getting a call function error in vba?

I have some functions in a worksheet excel objects that I want to excess from one of my forms. The error is "Object required" Any idea what I need? Microsoft Excel Object: Public sub ...
-2
votes
1answer
16 views

Show userform on worksheet select

I have three worksheets in a workbook. I want to show a specific user form when the user selects one of the worksheets. How can I achieve this in VBA?
-1
votes
2answers
23 views

How can I open a specific sheet named after a month?

I have a bunch of Month Tabs What is one way to open a specific one with VBA? I tried using this snippet: Private Sub Workbook_Open() Dim ws As Worksheet Dim mnth As String, dte As String, mday As ...
-1
votes
0answers
8 views

Copy over worksheet modules, forms to new worksheet?

When I copy over a workbook/worksheet over to a new workbook and add it as a worksheet, the code for the worksheet copies over but not the form/module. Is there a way to copy those over as well?
0
votes
2answers
30 views

How can I make Excel ignore special characters and spaces when taking data from another cell?

I have an Excel workbook which is used to produce quotations for customers. It automatically generates a unique quotation number based on the salesperson's name, the name of the company receiving the ...
1
vote
0answers
15 views

shift data down in one sheet when a new value is entered in a different sheet

I've reached a point where I'm quite sure I need VBA but I don't know VBA so I need your help. So: I have a worksheet for organizing data on certain ceramic products. In my main sheet (called ...