long

  1. E

    Automatically update cell.value as long as a ActiveX checkbox is checked - excel 365 on WINDOWS

    C2.value is updated when a button is clicked. My wish is that so long cbox1 is checked O17.value = C2.value Private Sub cbox1_Click() If Me.cbox1.onValue = True Then Sheet1.Range("O17").Value = Sheet1.Range("C2").Value End If End SubWith this code I need everytime click the checkbox...
  2. G

    Error with the below code "Can't find project or library"

    Hi Everyone, I am working in a project and below is my complete code. Option Explicit Sub Try() Dim TOrig As String, STMonth As Long, SCMonth As Long, ECMonth As Long Dim I As Long, J As Long, CMon, cCol As Long Dim lrow As Long Dim add_month As String add_month = InputBox("Insert the...
  3. B

    Randomize where a random number is limited to the number of repeats

    I have this code to select a random number up to the value I enter in Cell A1 In Cell B1 I enter the number of rows I want to fill. This VBA ensures that each number is only selected once The problem I have is that sometimes Cell B1 is a larger number than cell B2 so I want to be able to enter...
  4. J

    adding code to an existing macro

    hi all, i have a macro set up which works great and i want to add the below code to it, i know where i need it to fit in but i dont know how to get it to work after Sub MonthlySpreadsheetJanuary() Dim List As Variant Dim LR As Long Dim r As Long List = Array("Cash Movement") LR = Range("C" &...
  5. H

    Excel VBA to rename filesname or folder

    Hi Any idea why this not working? :D Sub ChangeInFolder() Dim OldName As String Dim NewName As String Dim LastRow As Long Dim i As Long LastRow = Range("A65536").End(xlUp).Row For i = 1 To LastRow OldName = Range("A" & i).Value NewName = Range("C" & i).Value Name OldName As...
  6. TAPS_MikeDion

    Is there a shorter way to find the next available number?

    Hi everybody, Below is the code I'm using (it does work) to find the next available number in a series of numbers in column A. I search through column A, find the missing numbers, put them into an array and then find the smallest number in the array. Is there is a more simplified/efficient way...
  7. D

    Copying from one table to another

    I have some code that used to copy certain columns from every record in a table on one sheet to new rows of a table on another sheet. I didn't change anything but it has stopped copying the rows when I run the code. This is the code: Sub cmdSend() Application.ScreenUpdating = False...
  8. T

    Messagebox listing going down instead of across

    The code below lists the address of all cells in a pre-defined range whose value is zero. Dim Rng As Range With ws Set Rng = .Range(.Cells(1, 1), .Cells(1,1000)) End With Dim ZeroColl As Collection Set ZeroColl = New Collection Dim...
  9. M

    VBA to convert column range of date to long int

    Hi Folks, I have a script that copies ranges (columns) of data from one workbook to another. It copies a column of Dates in format MM/DD/YYYY and I'd like to convert that entire column to long integer. So here is my code that copies the columns over: Dim nmary As Variant, sh1 As Worksheet...
  10. O

    [Windows API] Popup menu and selected text

    Hello, I've already tried to use the Office.CommandBars class to implement popup menu with text boxes. It seems to perfectly work on Excel, but I don't actually develop the userform in Excel, but in CATIA (CAD software which comes along VBA7 64 bits). Importing the Office library doesn't seem...
  11. N

    Check for duplicates

    Hello, I have a userform with 8 textboxes (txt_Name1, txt_Name2...txt_Name8) I'm trying to add a piece of code to check the textboxes above if any name is duplicate, I tried the following code but didn't work Can you please help me? Code: Private Sub cmd_Add_Clich() Dim i As Long For i = 1...
  12. kweaver

    VBA: need unique values from a column

    In a worksheet (called Summary) I have values from G2 to Gn and I'd like column H from H2 to however long to be the unique values from G.
  13. J

    Loop and Long Formula

    Hello: I have a loop that is filling in formulas based on a cell value. The formula for "A" is fairly simple and is included in the code as a formula. But the one for "AB" has a lot of nested ifs and it's so long, I couldn't get it to work -- I kept getting syntax errors. So, I decided to simply...
  14. P

    Problem with duplicates

    Hi All I'm using the code below to create template copies, how can i adapt it to avoid duplicates please and only create unique worksheets. Sub NewDays() Dim i As Long, LastRow As Long, wksht As Worksheet Sheets("Tides").Activate LastRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 1...
  15. kelly mort

    VBA - get active printer status

    Private Declare Function GetPrinterApi Lib "winspool.drv" Alias _ "GetPrinterA" (ByVal hPrinter As Long, _ ByVal Level As Long, _ buffer As Long, _ ByVal pbSize As Long, _ pbSizeNeeded As Long) As Long Private Type PRINTER_DEFAULTS pDatatype As...
  16. W

    How to export filtered listbox contents into an excel file?

    I am using an userform with a listbox and I want to export the filtered listbox contents into an excel file. myarray = Sheet61.ListObjects("Data").DataBodyRange.Value With ListBox1 .List = myarray .ColumnCount = 25 .ColumnHeads = False End With This code loads the DataBodyRange.Value into...
  17. G

    Show names in message box.

    Hi everyone, I am using vba to count the number of cells in a worksheet that contain "0" and the number of cells that contain a value then display the results in a msgbox, this code is working fine... what i would like it to do if possible is to also show in the same message box the members...
  18. G

    Vba Delete row if data from another cell exists

    Hi, I have the below code however I need to change it to reference cells C4-C4 and delete the row, if Column H contains the data typed in cells C4-C7. Thank you for any help . Sub Loop_Example() Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long...
  19. G

    Can I amend a macro to repeat with different rows

    Hi I have this macro that moves data from column G when it contains specific requirements. What im trying to do is to repeat it so if column H contains the specific data then I need data from columns H & I into column BB and then if column I contains the data I need the data from I & J moving...
  20. K

    Help:Need to import two tables only from web pages at a time

    Dear friends, I would like to import the following: Table 0 from: https://www.global-rates.com/interest-rates/libor/american-dollar/american-dollar.aspx Another table named: additional information per maturity from: https://www.global-rates.com/interest-rates/libor/american-dollar/2019.aspx...

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