exit

  1. S

    Syntax errors

    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: Syntax Error: Function TotalAdder(RCell As Range) 'Begins Error Handling Code On Error GoTo Helper Dim xIndex As Long Application.Volatile xIndex = RCell.Worksheet.Index nsheet = Left(Tname...
  2. M

    database manager

    Hello, I explain my problem, I create a database manager, to use it is very simple, in the sheet BDD Chat you will find a button that opens the manager, once open you will find a combobox that lists the name of the lists, a listbox which lists the items within a list, 1 button add a list, 1...
  3. A

    Workbook_SheetChange event

    I need pivot tables to refresh automatically once a user enters new source data. I have my workbook set up on monthly tabs and the users can enter data below row 12 on each of these tabs. I have set up the workbook with dashboard/display tabs at the front and the monthly data sheets at the...
  4. W

    need to add cell to this VBA code

    Need to add Cells D7, F7, H7, J7, L7, N7, P7, R7 can't get it to work. Private Sub Worksheet Calculate() If Target.Cells.Count <> 1 Then Exit Sub If Target.Address <> "$B$7" Then Exit Sub If (Target.Value >= 0) And (Target.Value < 0) Then Exit Sub Pictures("Picture 7").Visible =...
  5. J

    Sorting Payment list schedule

    Hi, i have spreadsheet with the fields: date, vendor name, amount how can the code below be modify to sort the date and also vendor name with same date. code: Private Sub Worksheet_Change(ByVal Target As Range)'Updateby Extendoffice 20160606 On Error Resume Next If...
  6. kelly mort

    VBA code to check if any of a range of controls are blank

    Hi, I have done some sniffing around to see if I can find solution to my problem. I came close but needed a hand to finish it up for me. Dim allEmpty As Boolean allEmpty =True For Each crtl In Me.Controls If crtl.Name Like "txtM*" Then If Trim(crtl.Value) <> "" Then...
  7. M

    consolidated sheet

    Hi, I want to consolidated sheet from 10 different workbook to single sheet in same folder. VBA code should like, first check that file exists or not if exit than run code if file not exist then exit sub or loop.
  8. S

    [VBA] export selected range as PNG with enhance resolution

    I found the following code in exporting selected range into PNG. It works well. However, the displayed image is a bit non-smooth, especially the font. Is there a way to enhance the export resolution? Thanks. Sub CommandButton56_Click() Application.ScreenUpdating = False...
  9. willow1985

    Drop down box value to trigger macro

    I have drop down lists in column O where you can toggle the status from "blank", to "open" to "closed". What I would like to do is have a certain macro run every time the status is changed in any of the cells in column O. the following vba code that I currently have (that I inserted under...
  10. zendog1960

    1004 error

    Hello folks, I am getting a "run time error 1004 application defined or object defined" error. I am adding the code below. I would appreciate if someone could look the code over and let me know if they can find out why I am getting this. First things first: in the Range D2, I have that cell...
  11. R

    Exit main macro if frmMsgBox equals no, else run main macro

    Hello! :) I have a large main macro. I would like for the very first thing it does is to call a custom msg box that will ask the user whether or not they wish to exit the macro, or if they wish to continue. If they wish to exit, I need to exit out of the custom msgbox sub AND also out of the...
  12. P

    Update cell after update from userform

    HI i hope you can help me with the code below as this is not working an i am trying to update a cell in a sheet called 'Data' if changes are made in my userform, my range in the 'Data' sheet my range is A1:R17 , ROWS B1:R1 have dates inand columns A2:A17 have areas in, then B2:R17 have numbers...
  13. S

    TextBox Exit Event

    Hello Everyone, Have used this site many times as resource for my excel vba needs. Was hoping an individual could with a specific problem involving Win10. I have developed a userform to assist in a rework process. Intended result is user to enter a serial number using a textbox, if...
  14. C

    VBA - Delete Row On Protected Sheet

    Hi, I have an auto sheet event script running on my workbook which deletes a row from sheet 1 and moves it to 2 other worksheets when completed:- Private Sub Worksheet_Change(ByVal Target As Range) If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, Range("N:N")) Is...
  15. S

    Error Closing Userform

    I'm popping an error when I hit the "X" closing a userform. Here's the code that should close it. Am I missing something obvious? thanks! Private Sub Userform_QueryClose(cancel As Integer, closemode As Integer)On Error GoTo Helper If closemode = 0 Then 'Application Closer If...
  16. D

    VBA explanation please.

    Can someone explain what this code is doing? thanks in advance. Private Sub Worksheet_Change(ByVal Target As Range) 'Updateby Extendoffice 20160725 Dim xCell As Range If Target.Address <> Range("C54").Address Then Exit Sub Application.ScreenUpdating = False For Each xCell In...
  17. J

    Setting the name of a PDF file export

    Hey there! I have some VBA code that I slightly adapted from the internet and it's working pretty well. The code takes a page on my workbook, exports it to a PDF, then attaches it to an email. I work for a non-profit and I'm hoping to use this to speed up invoicing for some of our training...
  18. D

    VBA only allows 2 rows then starts to overwrite why?

    Hi All, i have the below VBA code. when a row is marked as "CLOSED" on another tab the row moves to a new tab. but there seems to be an error with the code as it only allows 2 rows in the new tab then starts to overwrite the rows. any help on how to fix this will be highly appreciated...
  19. L

    Exiting a nested for cycle

    Hello guys, I sometimes have for loops nested in for loops, but once i find my answer id like all of the loops to exit, not just the current one. My current code looks like: For Each item1 In fulllist1 For Each item2 In fullList2 If item2.Text = "hit" Then done = True...
  20. I

    Merge two Worksheet_Change codes

    Hi, I habe these two codes. Private Sub Worksheet_Change(ByVal Target As Range)If Intersect(Target, Range("J1:M3")) Is Nothing Then Exit Sub Application.EnableEvents = False Target.Value = UCase(Target.Value) Application.EnableEvents = True End Sub Private Sub Worksheet_Change(ByVal Target As...

Some videos you may like

This Week's Hot Topics

Top