Find and Replace keeps crashing

I am using a Find and Replace, simple VBA code as below: Sub MultiFindNReplace() 'Update 20140722 Dim Rng As Range Dim InputRng As Range, ReplaceRng As Range xTitleId = "KutoolsforExcel" Set InputRng = Application.Selection Set InputRng = Applicatio...
more »

2017-12-03 23:12 (1) Answers

Homework Help - Reading code and counting integers

I need some assistance trying to grasp a concept that our teacher is trying to get across. This is a beginning VBA Access course and we have just coded our first simple project. Unfortunately, I am unsure if I am not grasping the concept because he's...
more »

2017-12-02 08:12 (1) Answers

Find Rightmost Used Column in Excel with VBA

I am having trouble with something that I think should be quite simple and I can't figure out why it isn't giving me the result I want. I have an Excel worksheet sht_Attributes that is laid out as below: I want to get the last (farthest right) cel...
more »

2017-11-30 16:11 (0) Answers

VBA Excel Macro save as part of cell with date

I have the following VBA code saving workbook1 sheets to a folder where workbook1 file is saved. Example: workbook1 has 31 sheets. The code saves each sheet to a new workbook with the same name as the sheet. (Sheet1, Sheet2, etc). Sub SaveShtsAsBook...
more »

2017-11-21 00:11 (2) Answers

Find Item.index after using Items.find

How do you look up the index of a contact item that was set using the items.find method? After finding the item, I want to be able to move to the next item, but my code sends me to the first item in the collection. A condensed version of my plan is...
more »

2017-11-18 00:11 (1) Answers

VBA String to Integer without rounding

I want to convert a String into Integer and keep the decimal places. I tried multiple things like Foramat and CInt but all of them end up rounding my value. My Code is: Dim posZ As Integer Dim TestZ As Integer Dim strTestZ As String Dim TestZold As...
more »

2017-11-15 10:11 (2) Answers

save and rename Outlook attachments with a number

Good day, I have a script that will save (to specified folder) and rename attachments which are added to incoming e-mails, the issue is that it will save all attachments. Can someone help me to adjust this script for only .DOCX (word documents)? P...
more »

2017-11-14 17:11 (0) Answers

Excel VBA - Find on merged cell

I am not able to using VBA find function on a merged cell. If I unmerge that cell, it finds that cell correctly. Is there any solution to this? Private Sub FindTry() Dim oFind As Range With Sheet2 Set oFind = .Cells.Find("/", , xlVa...
more »

2017-11-09 12:11 (0) Answers

SQL.CommandText and Updates with ADODB

Dan, the code works. But here is the issue: how can I assign a value in each cell within Excel? Dim Name As String Dim Name1 As String Name = "test1" Name1 = "test2" To something like this? Dim Name As Variant Dim Name1 As Variant Name = Cells...
more »

2017-11-04 20:11 (3) Answers

VBA - Find value from range of formulas

I have this line of code that is supposed to find the same value in a range: Set RowN = oldDashboard.Sheets("Dom").Range("F1:F1000").Find(this.Sheets("Domestic").Range("A" & i).Value) It works fine when my range is composed of values but when ...
more »

2017-10-30 10:10 (1) Answers

find file function vba

I have a problem with a function receiving two values path and file for directory and filename to find the location of the file. The problem is that the function continues with the code even after the file was found. Function TraversePath(path As St...
more »

2017-10-28 19:10 (1) Answers

What data type does find method return?

I am trying to search 3 columns contained in the range specified below. I have spent a long time looking online and I have found similar questions but when I apply it to mine I am not getting the correct answer. So far (from another questions answer)...
more »

2017-10-25 19:10 (2) Answers

Combobox with list find function additem vba excel

Im trying to do a Combobox on VBA Excel that add items depending on the return of find function that look's if what i wrote exist in my worksheet and show the liste of all words that start with what i wrote. To be more clear, i want to create a kind...
more »

2017-10-25 12:10 (0) Answers

VBA other Workbook Doesnt close Properly

Hi there My VBA code does not want to close my Raw data File properly. I have a data capture form then , When I hit Submit, Opens another Excel File, Copies all the data into it and is supposed to save and close the workbook. My code is as follows: ...
more »

2017-10-24 15:10 (1) Answers

Access Multi-field Search with Results as you type

Good morning, all, My question today is regarding multi-field search. I have a split form (fields and individual record at the top, all data in datasheet view on the bottom). I have multiple fields I would like to search on, so that a user may find...
more »

2017-10-18 14:10 (2) Answers

Excel VBA: Refresh All and Save

I have a very very simply task of wanting to refresh all on the workbook (which only contain 3 tables with external data) and save it every 5 minutes. I currently have the workbook running an auto save every 5 minutes via: Sub SaveWb() ThisWorkb...
more »

2017-10-10 23:10 (1) Answers

Forget to save excel macro

I was working on an excel macro and apparently I did not saved with a format that support vba macros. So when I open the file I cannot found the vba code. Is there a way to restore the code I wrote, especially that I pushed the save button in the edi...
more »

2017-10-10 16:10 (2) Answers

excel vba find property with other characters

In the codes, I want to find a specific value's column number in a worksheet and that value will change almost everyday. And sometimes it will contain characters like "İ", "Ş", "#" and other staff. The problem is, find property doesn't work with t...
more »

2017-10-05 10:10 (1) Answers

Worksheet_Change Macro with moving trigger cells

UPDATED I need to show or hide a worksheet based on the answer to a question in the sheet. If the answer is "Yes", then show the sheet. If "No", then hide it. So that part is easy... Now, this question might exist multiple times on the sheet. If th...
more »

2017-10-04 19:10 (1) Answers

Trouble parsing XML with VBA

I'm trying to clean geocode data using Google's Geocode API. Sometimes I can get the right result and sometimes my code comes back with zero results or invalid request. I'm using the following code: Function GetCoordinates(Address As String) As Stri...
more »

2017-10-02 16:10 (0) Answers

How to use an array of objects in vb

I'm trying to learn how to use an array of objects, but I don't understand very well. I have to export data from an Excel file to an Access db. Private Sub Import_XLS(ByVal fileData As String, ByVal dbEmpty As String, ByVal dbDest As String) If...
more »

2017-09-28 11:09 (1) Answers