goto

  1. J

    Run a macro by running a different macro

    Hi, I have some code as seen below that I would like to be run part way through the code of another macro. How do you do this? Thanks in advance :) Public Function CheckSheet( _ByVal SheetName As String _ ) As Boolean For Each TargetSheet In wbTarget.Sheets If...
  2. gheyman

    Using a UserForm to rename a tab

    I have code that pulls in tabs from another workbook. When I do this, I want a Userform to pop-up and force the User to rename the tab. (I'm doing this because I use a lot of Indirect formulas that use the tab name in it: =IFERROR((INDIRECT($A4&"!$L$3")),"") where $A4 is a tab name in a...
  3. H

    Searching Email between Month Dates

    Hi Below is the code from a userform for a listbox that returns emails from outlook, I'm having trouble searching between 2 dates when I search a date between months, searching within the same month works OK. When clicking on the list box it displays the message in the below textbox and then...
  4. K0st4din

    Please ask for assistance to place Array

    Hello, everyone. Thanks to the Rick Rothstein, this macro jumps through a sheet1 - because my database is located here. This macro works super, super, very good, but please for your cooperation, help me to re-skip it (skip) sheet1, but fill in my worksheets. I mean: Array ("Peaches", "Apples"...
  5. T

    Using user-defined functions on the worksheet

    I have a function as follows: Public Function abc (a, b, c) abc= a + b + c End Function I can use it in Excel by typing: =abc(1, 2, 3) which returns the value of 6, as expected. I have another function which finds the last row on a worksheet: Public Function LRow(ByRef wks...
  6. K

    Help on best method to copy paste from one wb to another wb

    The code below is run from ThisWorkbook. It opens another 4 wb's (Gr1.xlsm, Report1.xls, Report2.xls and Report3.xls), and copies data from wb Report 1-3 into 3 different sheets in wb Gr1. Vba works, but I'm looking for a better way of writing it. One issue is to avoid as much use of .activate...
  7. D

    Application.Match Getting Run-Time Error 13 Type Mismatch

    I am trying to check some of the common email domain names when people enter them into an Excel Form. I have a spread sheet tab with names like gmail.com Comcast.net Hotmail.com etc Below is the code I am having problems with. I keep getting a Type Mismatch on this line If...
  8. S

    Setting a variable

    How can I do this? rg = Left(a1, 6) If rg = "OR0020" Then GoTo OR0020 If rg = "OR0025" Then GoTo OR0025
  9. H

    VBA for the following - cell range clarification needed

    Hi I have a workbook within which there is a worksheet called Actions. In cells H5:H18 I want to reference worksheet Lists, cells C22:C29. I have the VBA for the thing I'm trying to do (allow multiple selections from the drop down list) so that's all fine, but my VBA knowledge is very limited...
  10. P

    On Error Messages

    I have the below formula. I need an On Error message prior to this line of code "data_end_row_number = ws.Range("A1").End(xlDown).Row" that will pop up a msg box that says some information for why error is happening. After msgbox, i just want macro to end. I cant trying different methods but I...
  11. P

    Adjust a range

    Hi All I'm having a bad day, been trying to do the below using conditional formatting and cant get it right. How do I adapt the blow to highlight only columns A-L rather than th whole row? kind regards Paul Sub color() Dim color As Integer For Each cell In Sheet2.Range("A2:A65536")...
  12. T

    Export sheets to single PDF file, but only certain sheets

    As per the title really, i'm looking to export specific sheets from a workbook to a single pdf file, the sheets are 1,3 and 4 plus any sheets found after 7 I've pretty much run myself into a brick wall with this, i simply can't see how to fix it, so i'm hoping someone here will be able to point...
  13. NewToExcelGlenn

    Goto Last Open Cell In Column D, Make It Equal To Cell G3

    Range("d" & Rows.Count).End(xlUp).Offset(1,0)= Range("g3") Hello. Can anyone tell how to goto the last open cell in column D, and make that equal to cell g3. Cell G3 has a number in it? Thank you.
  14. B

    VBA Code to show autofilter criteria just show result as <>, even though filter is set

    Hi! I have used the below code for a while, but a few days ago it suddenly stopped working. Can anybody please help me with a solution for this? It's not working on any computer it's tested on. <code>Function DispCriteria(Rng As Range) As String Dim Filter As String Filter = ""...
  15. T

    Enter Key resumes macro after cell values are changed

    Hello, I'm using a Select Case MsgBox. ("Change a Value?") If No GoTo CarryOn. So far ok. However, if Yes is selected, I would like to enter the sheet at "D2" and then manually move around the sheet and make changes where necessary. After changes are made, Press Enter Key and GoTo CarryOn...
  16. T

    Using a goto statement inside a loop

    Hi, I need to do something on a series of accounts with a macro and I am stuck on how to use a goto statement inside a loop. for example my codes is: Excel.Range("A2").select accountno = excel.activecell.offset(0,0) count = 0 do until XXXX if conditionA then goto nextaccount if...
  17. L

    Error Handling - 2nd Loop Doesn't Pick It Up

    ** RESOLVED with Resume ResumeCode under "rngPicPosition = "IMAGE UNAVAILABLE"" Hi, I'm trying to import a picture using an URL, if the picture isn't found then go to my Error Handling code. Which works fine on the first loop but then fails on the 2nd +. Any suggestions? I'm 100% sure it's...
  18. A

    Problem with on error goto, in pivot table macro - I still get an error

    hi I am trying to create an automated script to automatically change multiple examples of the same field dropped into a pivot table into defined calculations of that field. eg change the first instance into average, second into stdev, 3rd into count etc. This requires them to be renamed to...
  19. B

    Clear Contents If

    Good evening Looking to clear all if any one of the following worksheets exists otherwise continue to add the sheets if they do not exist. Not sure how to proceed With ThisWorkbook On Error Resume Next .Sheets.Add(after:=.Sheets(.Sheets.Count)).Name = "RegionA"...
  20. E

    Getting Data From a web site into Excel

    I have the following macro which has worked for ages until the web page format changed. Now, this macro still pulls most of the data but doesn't retrieve the real data I need which is the actual fire runs below the headings. Can anyone help. You can drop this macro into any blank workbook to...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top