call

  1. P

    Copy cells (values & Formatting) from one worksheet to another.

    First off I'm newish to VBA (so please be kind) I trying to write a Sub that will loop through a number of cells (values and formats) from a "Source" worksheet to a "Target" worksheet. I found some code that copies values and formats (one cell at a time). So I put it into nested For Loops and...
  2. R

    Excel VBA: Filtered data returns 2nd result when calling each row

    My sheet named Database has numerous rows of data. The first 2 columns have titles, and the user can select from these titles in a drop down list and filter the data so it only displays results that contain these titles. In addition to this, I have another subroutine called GetNextResult. The...
  3. S

    call macro from a different document

    I am creating a macro in New Outage OSP reporttemplate.xlsm. During this macro,I open document OSP Staffing All Voice.xlsm. the macro being created is New_Outage_macro. OSP Staffing All Voice.xlsmhas a macro already on it called Private Sub cmdcalculate_Click(). I want to call the...
  4. H

    Module Usage

    Hi - I have a general questions about whether it's best to put all your code into 1 macro, or create separate modules for each procedure and then call them? thanks!
  5. P

    Opening a Macro from another work sheets query

    Good Morning I have a file open we will call this file 1 I want to run a macro from another file and we will call this file 2 when i run the macro will it do the instructions i have set on file 1 or file 2 Hope anyone can help Cheers Steve
  6. M

    Column hidden call macro / column visible call macro

    I'm needing to call a macro based on hidden or visible column C ??? :confused:
  7. C

    Workbook_Open() - Call - Call subroutine but does not return

    I am no genius with VB, however I was quite happy with myself when I created a workbook and added under Workbook_Open() four sub-routine's by simply using Call Macro1(), Cal Macro2(), etc. However in my current project file under Workbook_Open(), I start with: Private Sub Workbook_Open Dim...
  8. Z

    Pass Worksheet_Change Target Value to Userform

    Hello All, Here is my situation. I have a Worksheet_Change Event that tracts when Range AC has data entered. I have a YesNo message box that pops up asking the user if they want a special document to be drafted. If they select yes, then a userform will pop up with three option select and a...
  9. S

    Multiple if Query

    I need help! I need help with a formula (in column D) to help me determine 2 categories: Right / Wrong If my customer name in column A contains the word "Apple" (could be variations of name, And if the country (column B) does not include "Ireland" and if the products (column C) includes "Pen"...
  10. SanjayGMusafir

    VBA Not working help improve

    Dear Experts I wrote a VBA copy bits from here and there. It worked fine, the day I created, But now it's giving continuous error. It stops at the Red highlighted point and gives error. Can you help me find the error and improve. Thanks a lot ? Private Sub Worksheet_FollowHyperlink(ByVal...
  11. R

    ComboBox List from Range that selects a range until last row

    So I have a userform that initializes with the following code. The comboboxes are named CB_AQUEOUS and CB_SOLDIS. I have ranges in Sheet1 that I source the lists from. But if the ranges change, I have to manually update the code. Is there a way I can simply do a *last row* on this? Is the...
  12. S

    Copy then paste to specific cells where criteria matches

    Hello everyone! I have an excel file where some data is provided by other teams (call this the "Source"). I need to take this information and copy it to specific columns in another excel workbook (not worksheet) (call this the Destination) where the Province matches in both worksheets. I am...
  13. O

    Subscript out of range error?

    Hi, I'm getting the "subscript out of range" error and I'm not sure what's causing it. When I debug it, it stops at the following point: ActiveSheet.ListObjects("Table__2020_RevTM.accdb").Range.AutoFilter Field:=1 This is the whole function, it basically gives me this error when I save...
  14. D

    Activating Already Open Internet Explorer Window

    Hi, What is the code for activating an already opened session of IE? And can I identify this as a variable name that I can call from different routines? Thanks, Bobby
  15. davewatson86

    vba- hiding ribbon issue

    Hello all my vba knowledge is quite limited so please be patient. have this code to hide the ribbon and all the unnecessary excel bits from the user. it works a treat except when i open a workbook that has macros it throws an error because it is trying to show the ribbon etc before the user...
  16. M

    New to VBA: Go to Next If Statement

    I have some code that I am messing with for a pet project at work for an inventory form. I have the pictures of an item with macros for a mouse click to remove one from the "on hand" inventory. in Sheet 1. From there, I have on Sheet 2 the "inventory database" which includes the Quantity on...
  17. M

    Is it possible to add a parameter in the UserForm_Initialize() function ?

    Hello everyone, So, yeah, the question is in the title. Can I for instance write something like Private Sub UserForm_Initialize(rowCount As Integer) and call it in my macro with myControl.UserForm_Initialize(rowCount) and expect it to work ? Thanks you for reading, Marie
  18. J

    Listbox to ComboBox

    Hi, how can i chang the code below to work in ComboBox1 instead listbox. Code: Private Sub ComboBox1_Change()Dim i As Integer For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) = True Then Select Case ListBox1.List(i) Case "Allstream" Call Allstream Case "ANI NETWORKS"...
  19. Y

    Call VBA function in a cell

    How can i call a vba function in the middle of a cell value in the formula bar. for instance, if i have a function that calculate an area in vba. if i put =area(3,4) on the formula bar it gives me the result. But now, assuming I want to sum the result of two areas in a cell, how do i go about...
  20. S

    Why am I getting an "Object required" Here?

    Why am I getting the following Error Message on the Below codes. Run-time error '424': "Object required" Public Sub NewIT() Dim Employees As ListObject Set Employees = ThisWorkbook.Sheets("Employees").ListObjects("Employees") Call ThisWorkbook.Worksheets.Add(After:=Employees.Parent...

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