integer

  1. A

    Code works on my computer but not any other

    Hi all, Having some trouble and not sure what to try next. I'm getting the following run time error on other people's computers but it works fine on mine: '-2147417848 (80010108)': Method 'Add' of object 'ListRows' failed Here's my code, please excuse the rough coding as I'm very new at this...
  2. 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
  3. M

    Multipage Mousemove Event

    Hi. Looking for guidance on how to use mousemove event on a multipage? Im trying to have a image as a button, and hover over changes colour. Below code works for a userform mousemove, but can find a solution when over a multipage instead Thanks Sub ExitButtonInactive_MouseMove(ByVal Button...
  4. R

    How to output the result from existing sheets to new worksheet

    How to output the result from existing sheets to new worksheet ? What is the code in need to add in ? [Sub MissingHobbies()Dim c As Integer, h As Integer, ans As Integer ans = 9 For c = 2 To 11 ' candidates For h = 3 To 6 ' hobbies Cells(8, 1) = "Hobbies" Cells(8, 2) =...
  5. montecarlo2012

    vba code to get all combinations and permutations IF they equal a cells

    Hello folks I have been trying to work around this code, I need some hands on here, Please. I am trying to generate all possible combinations and permutations possible from the set of numbers from 0 to 9 taken four at a time BUT display ONLY the one’s that match the conditions. The condition...
  6. R

    Need code to paste formula in blank cells in range only

    Sub Populate_TotalDeposit_BankDate() Dim m_XlCashPostWrkSheet As Worksheet Set m_XlCashPostWrkSheet = ActiveSheet Dim mCashPostRowCount As Integer mCashPostRowCount = m_XlCashPostWrkSheet.UsedRange.Rows.Count Dim m_XlMatchedDataWrkSheet As Worksheet Set...
  7. R

    Output error with VBA

    Based on the data and output at https://ibb.co/qNmx8Lz What is the error that caused error at 3rd column of the output ? Below is the code that I have been using Sub MissingHobbies() Dim c As Integer, h As Integer, ans As Integer ans = 9 For c = 2 To 11 ' candidates For h = 3 To 6 '...
  8. R

    Returning Missing Variables on A Merge Cell

    Hello members, I need your kind assistance with regards VBA. Attached herewith is the sample data,together with the output. For this questions, There are 5 candidates in the list and each of them will take part on their favorites sports during weekday or weekend. If they participate in a...
  9. E

    Create a sumproduct function in vba

    Hello, I need to make a sumproduct_if function in vba, but I really don´t know how to start. This is what I have: Function SUMAPRODUCTO_SI(rango_1 As Range, rango_2 As Range, rango_cond As Range, condicion As String) As Double Dim filauno As Integer, columnauno As Integer, filasuno As...
  10. most

    Can't get Workbook/sheet reference to work in my function

    Going crazy on this one, what i'm doing wrong? It's an "Object variable or With block variable not set" on "Set FromWbs" in the function. /Marcus Public FromWorkbook As Workbook Public ToWorkbook As Workbook Public FromStartRow As Integer Public ToStartRow As Integer Sub CopyColumn2Column() '...
  11. D

    Transpose VBA not working

    Hello All, I am having an issue with this little piece of code. For some reason it is only transposing the information every other line and has been driving me crazy. I am still pretty new to VBA, so any help would be greatly appreciated. Dim numrows As Integer Dim counter As Integer Dim x As...
  12. T

    Duplicating the ActiveCell

    I want to duplicate the active cell to specific cells on a calendar and everything seems to be right but my code as is does absolutely nothing. I added in a msgbox just to make sure that it is picking up the value of the active cell and it is however it cant seem to print it in the other cells...
  13. P

    How to call Workbook_BeforeClose Event when commandbutton is pressed

    Option Explicit Private Sub CommandButton1_Click() Workbook_BeforeClose End Sub Private Sub UserForm_Initialize() Me.Caption = "Print, Save and Close" With Me.Label1 .Caption = "Do you want to print, save and close the workbook named: " & """" & ActiveWorkbook.Name & """"...
  14. J

    Get Website Login

    Hi, found this code to get the html coding box for username, password when i run get the error: compile error Next without for, please help. code: Private Sub GetWebsiteInfo() On Error Resume Next Dim ie As Object Set ie = CreateObject("InternetExplorer.Application") ie.navigate...
  15. montecarlo2012

    From macro to vba

    Hello everyone. I am here trying to see the transformation from a simple Macro to a Code, I know guy for you is something so Simple, but “ sorry “ no for me, I am a new self-thaught bee. I just sum two numbers with the macro recorder I got this: Range("H2").Select ActiveCell.Formula =...
  16. ExcelNooberino

    [VBA] Merge Cells

    Hi there everyone! I was wondering if it is possible to merge cells through VBA code, cuz I've been trying to pull it off and it seems I'm getting nowhere, I probably need some extra help :laugh: So the thing is, I add two new rows at the same time with some data by clicking this button but I...
  17. L

    for each sheet in worksheets

    Hi the code below does not work. Complaining about xsheet.Tab.ColorIndex = i I did similar idea with cells and everything was fine. Please see the second code. Thank you so much. Sub mysheets() Dim xsheet As Worksheet Dim i As Integer i = 0 For Each xsheet In Worksheets...
  18. N

    Extract integers or float from particular line of text file to excel

    Could you please help me to code the following: I need to pick only the integers/float from a particular line of the text file (say line 2 qnd 3) and store it in an excel with each integer in a separate cell in sequence?[Page1]MotorP_AvgTemp= 10, 11, 1.25MotorP_PackVoltage= 60, 32, 23.32...
  19. L

    merging columns

    Hi the code below does not give me an error message but does not do the job either? Any help would be appreciated. Sub col_merge() Dim x As Integer Dim y As Integer x = InputBox("first col#") y = InputBox("second col#") Workbooks(1).Worksheets(1).Columns("x:y").Merge End Sub
  20. M

    2 array compare using vba function

    Hello everyone :) I need your help with my code. I get runtime error #9 (subscript out of range). I have a function to check if a value is in an array or not. I can do this with other ways but I need to understand what is wrong with my writing. I hope you can help me answer that :) 'setting...

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