variant

  1. synergy16

    overflow

    can anybody tell me when the code (written in red) would cause a run time error 6....overflow? its not that big of a spreadsheet. '***************************THIS SUB WILL POPULATE THE CURRENT PART NUMBERS AT A SPECIFIC VENDOR********************************Private Sub vendorLB_Click()...
  2. L

    UserForm

    Hey guys, I'm creating a user form with some buttons, currently i have: Initialize label with name: Sub UserForm_Initialize(populatingArray() As Variant, positionOfOverWrite As Integer) Dim UserForm As Variant UserForm.Caption = "Data found!" Call UserFormCaption(populatingArray()...
  3. D

    VBA Create row and transpose

    Hi, I have a macro which creates rows according to a column value cell and transposes the rest of columns; and this works fine. Sub Copydata1() Dim data1 As Variant, data2 As Variant Dim i As Long With Range("A4", Cells(Rows.Count, "A").End(xlUp)) data1 = .Resize(...
  4. kelly mort

    For each loop getting tricky

    I am using this code to capture two events “Enter” and “Change” textbox data. So when there is a change in both variables, I want to use the “Enter” variable to locate the ID of that item. The reason being that I will change that item with the “Change” variable. I observed I can’t change it...
  5. kelly mort

    Data-type, case-match and InputBox issue.

    I have this code here and when I call the InputBox only the admin will match. All the others return the else statement. So I used that UCase but still. What is it that I am missing? Option Explicit Private UName As Variant, TheAccount As Variant Sub ActiveInactive () TheAccount =...
  6. D

    Reorder with swapping rows

    Hi, I write vba script for reordering. Unfortunately is to slow. The second method that i try is work match master but not copy text colour and cell colour. What I can do to increase the speed? Table before script. <tbody> AA -X100:1 -AA:-X100:1 XDX 1 -XDX:1 1 bk Conductor / wire === 1900...
  7. P

    Multiple Arrays and Loops

    I am comparing 2 arrays, and based off the comparison, placing values from an array into a range using the active cell. I am not receiving errors, but two things are happening. 1. Excel (not my machine) locks up when I run the code - How can I improve my code so this does not happen 2. I...
  8. J

    How do I find the number of dimensions of an array in VBA?

    So if I have dim varArray1() as Variant dim varArray2() as Variant redim varArray1(1,1,1,1) redim varArray2(10,10,10) How do I get something like GetDimensions(varArray1)=4 GetDimensions(varArray2)=3
  9. H

    PrintOut Row selecting problem

    Hello, I am working on a code and I would like it to PrintOut some sheets. I want some lines to repeat on each page. My problem is that the row number is a variant so I can't put it in the form :"$7:$8". They are like variant. I've tried many things but none of them seems to be working. Is there...
  10. D

    Help populating multiple arrays with one for loop

    I apologize if this has been answered elsewhere...I searched for quite a while and found nothing specific for what I am hoping to do. I am trying to populate multiple 1D arrays with a nested For Next loop. I have tried to use a string to build the array name (ie. arr1, arr2, etc.) and...
  11. most

    I don't want the empty rows in the array, I know why but...

    This script creates a lot of empty rows in the arrays. I understand why, but I don't know how to write the code so it won't, some pointers please. Sub GroundogDay() Dim i As Integer Dim Count As Integer Dim ArrDATE(1 To 33) As Variant Dim ArrROW(1 To 33) As Variant For i = 3 To 33...
  12. L

    ByRef Array Button Click

    Hi, I am trying to pass an array generated on one button click to a subroutine button click. For example Private Sub Retrieve_Attendance_click(ByRef LArrayDatesOfPay() As String)Dim todays_date_from As Variant Dim todays_date_to As Variant Dim rowNumSubmit As Range 'Dim LArrayDatesOfPay() As...
  13. S

    Set fs = Application.FileSearch 'does not work in 2007

    I have many spreadsheets using the function "file_search" below. The "Set fs = Application.FileSearch" does not work in newer versions of excel. I do not know how to modifiy the function, to get the same results. I think it gives a list of files in the folder picked. Sub read_results()...
  14. Skybluekid

    VBA Lookup using Tables

    Hi All, I am using the code below to lookup a value from a Table. Private Sub Worksheet_Change(ByVal Target As Range) Dim LU As String Dim Auth As Variant Dim LU2 As String Dim Tbl As ListObject Dim Rng As Variant Dim Rng2 As Variant Dim FT As Variant Set Tbl =...
  15. S

    Type Mismatch error

    I am receiving a "type mismatch" error on the line below. ArrTemp(nn) = Application.WorksheetFunction.Log(Application.WorksheetFunction.Index(TempSample, nn, 2), Application.WorksheetFunction.Index(TempSample, NumObs, 2)) ArrTemp is a variant, TempSample is a variant, nn is an integer, NumObs...
  16. J

    UDF Error - Structure or Datatype?

    I am trying to generate Pearson's Correlation Matrix; and subsequently Spearman's. When I use the Excel's in-built Correl function, I get the output. But, when I use my custom function for correl, I get a VALUE# error. That is, if I replace "Application.WorksheetFunction.Correl" with...
  17. M

    positioning image by using VBA

    Hello everyone, I am writing a VBA code in order to insert an image in a specific cell. everything works properly except the horizontal position; no matter what cell I define in the code, it always appear a bit to the left. can someone please tell me what's wrong? Thank you in advance! here is...
  18. S

    Help with Next code

    Hi I'am trying to do this. Have a spreedsheet that have some columns like this the table under here <tbody> <tbody> A B C D E F G H I J K 1 Name Date Finished Name Date Finished Name Date Finished 2 Roy 23.4.2018 x Mette 27.05.2018 Hanne 01.12.2018 3 Mette 27.5.2018 Oskar...
  19. L

    A working macro that I need to change the search range and write location

    I have a working macro that I need help changing. I need to change the search range to numbers 1 to 10, and write the cell location. I have 3 examples at the end and have uploaded my sample Excel workbook showing the expected result. Thank-you in advance for your assistance...
  20. S

    Error 91 in VBA

    Hi there, Im getting a runtime error 91 in VBA and cant figure out where the probelm is. I've used this code before and now its not working Sub Macro2() ' Defines variables Dim InputFile As Workbook Dim OutputFile As Workbook ' Open input / output workbooks: With...

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