integer

  1. L

    printing all workbooks names in one shot

    Hi The code below is to print each workbook's name. If I have 5 then it will msgbox these 5 files names. I want to improve this code so it can print all the name in one shot (not 5 msgboxs or whatever the number of the files). Is that possible? Thank you so much. Sub wb_names() 'to find...
  2. I

    7: out of memory

    Hi When I click button to generate report there is the 7 out of memory error popup Private Sub btn_Click() On Error GoTo ErrCheck Dim strPeriod As String Dim intFY As Integer Dim strFMth As String Dim cnt As New ADODB.Connection Dim rst As ADODB.Recordset Dim...
  3. Z

    copy to range problem

    [code] Sub checkwood() Dim i As Integer Dim r2 As Integer Dim lastrow1 As Long Dim woodcoasters As Range lastrow1 = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To lastrow1 r2 = 2 If Cells(i, 3).Value = Cells(14, 3).Value Then Range("A" & i).Copy Range("j" &...
  4. 3

    Invalid Qualifier

    Hi, I have the following code. However, it would not run - I got the following error message: Compile Error: Invalid qualifier. Wonder if someone could point what the error is. Thank you! Sub update_MTD() Dim minus_day As Integer, sessionDate As String, current_Month As Integer...
  5. Z

    VB Code help

    I am trying to get my info from my text boxes in my user form into my worksheet. I have done this multiple time before and had easy success but now I'm getting problems. I either gut a runtime error or there is no data transferred. This below transfers no data to the worksheet Private Sub...
  6. VBE313

    How to Offset Column in this Multi Select Listbox?

    I got this code from OnlinePCLearning. How do I offset every other column? Private Sub cmdAdd_Click() Dim addme As Range, cNum As Integer Dim x As Integer, y As Integer, Ck As Integer 'set variables Set addme = Sheet1.Cells(Rows.Count, 4).End(xlUp).Offset(1, 0) cNum = 7...
  7. J

    VBA Date Problem

    Hi, I have a problem with this code below. The code should load data 5 days before the date from the table in column "E", instead it is loading all of the data. I have also provided a screenshot in the link. Please, if anyone can help, it'll be helpful. Private Sub UserForm_Initialize()...
  8. C

    Problem Cycling Through Worksheets VBA

    I'm pulling my hair out trying to figure out why this isn't working. I run the macro from Sheet2 and it just ends up clearing everything on that sheet rather than on the ws that's up in the rotation. It will work if I activate the ws first, but that doesn't seem like the best solution. Please...
  9. F

    VBA: Set column widths

    I found the post below, but was hoping this could be done a manner where the array is written left-to-right versus up and down. As this is it works for my needs after I expand the ar(1) out to ar(15), just hoping it could be shortened. I'm starting with column A and setting out to column O...
  10. T

    Moving Worksheets to a new Workbook

    Hello, I am trying to move a group of worksheets to a new workbook. I have the code working when I hard code the worksheet names in the code, but I want to make those variables that will be filled by values on one of the worksheets, so that this can be run for different groups. This is the...
  11. B

    Using MSComctlLib.DataObject to retrieve email contents

    Hi, I have a drag and drop feature using a listview on my userform. I am trying to drag and drop emails from outlook to my excel userform. I am not very familiar with the MSComctlLib.DataObject type and its actually a bit more complicated as I thought. I am wondering if someone could point me...
  12. M

    Power Point VBA code

    Hi all, I am working on a presentation & I want to show a number that decreases (like a counter) & after looking on some YouTube videos I think it could be achieved much easier with the VBA loop. However, I am having an issue with the below code where it will start with 10 (in presentation...
  13. J

    Excel VBA: Sort sheets that only have a comma in the tab name

    Hi there I'm fairly new to VBA so please be patient with me :) I have a workbook that will have 60+ sheets. These will be named with clients names, then I have my working sheets. I am trying to sort my workbook by sorting alphabetically those tabs with a "," only but I can't get the script to...
  14. A

    Error retrieving getting data

    Can I receive assistance resolving an error running this code... The code is suppose to retrieve intraday prices. I email the author, but never received a response. Greatly appreciate the help. Thank you kindly ' Samir Khan' http://investexcel.net ' simulationconsultant@gmail.com ' Contact...
  15. K

    How can I make VBA loop through a column and for every cell index-match + copy the value from an auxiliary sheet?

    Hi everyone, Im relatively new to VBA, and struggling a bit with the syntax. Hope someone can help! What im trying to do is this: I have 3 sheets im working with, lets call them sheet1, sheet2 and sheet3. Sheet 1 is input data in which I want to look up a value, for every row in sheet 2. Sheet...
  16. L

    For i = 1 To i

    Hi I do not understand the for loop below. When I say for i=1 to i That is to me, I am assigning I to 1 and there will be no loop. I did step through but still can not see how "i" can be in the loop when it has been assigned to 1 and the max is i (to i). Can the code below be written in...
  17. K

    Ifail 0 then

    Dim CurrentYear As Integer Dim Previousweek As Integer Dim Ingrows As Integer Dim slaUK As String Dim lFails As Long CurrentYear = DatePart("yyyy", Date) Previousweek = DatePart("ww", Date) - 1 slaUK = "SLA builder UK.xlsm" Workbooks("SLA builder...
  18. A

    Application.Averageifs

    Hello, Is there any special way of using averageifs in VBA - I know I can do it as part of a formula, but it wouldn't work in this situation. It's always returning a value error when running without the iserror check, even though there is correct data as i tested with a formula. Sub test3p2()...
  19. J

    Global/Public Array

    Hi I am struggling to declare and fill in a global/public array. Here is my code Public Function myArray() As Variant Dim WS_Count As Integer Dim i As Integer Dim x As Integer Let x = 0 WS_Count = ActiveWorkbook.Worksheets.Count For i = 1 To WS_Count If...
  20. J

    VBA Loop to highlight cells that do not meet character length requirements

    Hi , I have the below code that I want to tweak , I receive fileswith 820 columns (AEN) and each column has different character lengthrequirement. EG. Column A ColumnB Column C Etc Len = 3 Len = 10 Len= 50 Etc...

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