dim

  1. G

    Formatting issue with constructing an array.

    I have the code below, written by someone else and face an issue we have not seen before. ReDim b(1 To UBound(a) * UBound(a, 2), 1 To 5) For i = 2 To UBound(a, 1) ant = a(i, 2) ini = 0.01 For j = 2 To UBound(a, 2) If ant <> a(i, j) Then If ant <>...
  2. V

    Excel VBA PCOMM only getting numbers and not text

    Hello there, Im trying to get text from PCOMM but only getting the numbers. Have try so many things, and cant find a solution. Hope you can help me out. The text looks like this in PCOMM GB0006 And Artikel1 should get GB and Artikel2 should get 0006. Then when i but them together in cell B2 its...
  3. D

    what does the follow Dim's mean

    I have some code provided here and trying to understand and learn from the examples which are great. Can someone explain the following Dim values Dim S$(), N&, A%, T$(3), b% for the above statement what do these do? S$() N& A% T$(3) b% W = [Sheet1!A1].CurrentRegion.Value2 at the conclusion...
  4. Jyggalag

    Please help me edit my VBA code/formula

    Hi all, I currently have the following VBA code attached to a macro that sends out an email and attaches a word file to it when I click it and sends this out to a list of emails (and also BCC's a list of emails): Now I want to edit this file so I can target a list of emails in the emails...
  5. D

    Help me understand my VBA code please (easy) - thanks!

    Hello everybody, I am currently managing a stock (inventory management) portfolio in Excel. In this, I have my current inventory quantity in column I and two columns in column J & K which I can use to subtract & add amounts from my quantity, so: Column I = Current quantity Column J = Enter any...
  6. S

    How d I save a workbook from a path and file name listed in cell from a second workbook?

    Hi All, I have a control (Dashboard) workbook/sheet that runs a filtering macro on one report and splits it out to the required fields based on the sort options I have put in. To open this I use Sheets("DASH").Select PathName = Range("K4").Value filename = Range("L4").Value...
  7. C

    Referencing Dim in VLOOKUP

    Hate to bump, but I'm stuck..... I posted Friday, but with 56 views, I'm the only post without a reply through Sunday, so I'll try to parse my inquiry. VLOOKUP Macro Workbook Reference Variable Range("J2").FormulaR1C1 = _ "=IFNA(VLOOKUP(RC[-5],[" & wkb3 & "]!C5:C9,5,0),"""")"...
  8. C

    VBA Outlook Run Excel Macro When Received email in Outlook Subfolder

    Hi, I want to trigger excel macro TEST12.xlsm when received en email with subject title "Test", it work when the mail arrived in inbox folder, but not in subfolder. Can anyone enlighten me or point me to the correct sub folder path? The subfolder name is "Biz Ops Report" and I am using below...
  9. G

    Print hidden sheets -

    I used the following code to print a hidden sheet and my first sheet disappeared .......can anyone tell me what the problem was, please TIA GT Sub PrintOnlyHiddenWorksheets() Dim CurVis As Long Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets With sh...
  10. D

    Exporting undelivered emails from Outlook to Excel

    As the title suggest, I'm trying to export Undelivered emails in Outlook to Excel (sheet1) I found this code on the web, and I'm having a little difficulty getting it to work Ideally I would like the data to appear in columns, a separate column for Email address etc The Emails are in sub-folder...
  11. J

    macro is skipping tabs

    good morning, Newbie here...i have a macro for auto generating tabs into PDFs and save them. the issue i'm having is that it is randomly skipping over some of the tabs. anyone have an idea how to fix this? I checked the ones that get skipped to see if cell "A5" is the problem but it is not...
  12. D

    Excel 2016 - Macro working on Win10 1709 and older but not on Win10 1803

    We received a excel sheet from a third party with macro's. It works fine when using Office2016 and Windows 10 build 1709 or older. But when using Windows 10 build 1803 it always goes to CONNECTION ERROR :S When we go to the original website it give back the response it should, but whenever...
  13. CsJHUN

    VBA slideshow-ish

    Hi guys i would like to create a userform, which load pictures from a folder, and change the pictures every 3-4 seconds, while the user can select between 2 option button ( good or not good). And the picture name,the selected option button value would be registered below each other. The 'sleep'...
  14. V

    Save file as folder name/sheets as file name

    Hi I would like to change this code to save the file as the folders name instead of "Total Results.xlsm" Also I'm trying to name the worksheets the same as the files that its importing instead of "Data" & i +1 Thanks a lot to anyone that can help Sub ImportCSVData() Dim wb As Workbook Dim...
  15. T

    Loop Each Tab and Delete Rows

    I have the following code: Sub delete_dc_row() Dim wbCurrent As Workbook Dim wsCHINO As Worksheet Dim wsSTOCKTON As Worksheet Dim wsFLM As Worksheet Dim wsDGV As Worksheet Dim wsAURORA As Worksheet Dim nLastRow, i As Integer Set wbCurrent = ActiveWorkbook Set wsCHINO =...
  16. T

    Find Next Empty Cell

    Hello, I have the following code: Sub EmptyRow() On Error Resume Next Application.Calculation = xlCalculationManual Application.EnableEvents = False Application.ScreenUpdating = False Dim wbCurrent As Workbook Dim wsCHINO As Worksheet Dim wsSTOCKTON As Worksheet Dim wsFLM As Worksheet...
  17. S

    VBA datestamp csv export filename

    Hi folks, Can anyone edit the snippet below to add a datestamp to the cvs filename in the format "yyyy-mm-dd hh-mm-ss"? Many thanks in advance! Sub saveTableToCSV() Dim tbl As ListObject Dim csvFilePath As String Dim fNum As Integer Dim tblArr Dim rowArr Dim csvVal...
  18. R

    Combine mutliple file in one PDF through VBA

    Hi All, I want to combine multiple files into one PDF. I found one code which is working fine if my all files in PDF format. Here my concern is, I have PNG files as well and the code is not able to combine PNG file however if i am combining manually then it combines all the PDF and PNG files...
  19. L

    fill a range with numbers - vba

    Hi The code below is going to fill a range with random number but all the cells will get the same number. What I want, is to fill cells of that range with different random number. So I am thinking to put that line of code in a loop but how can I loop when user might enter any different range...
  20. D

    VBA delete last row help

    Hello everyone. I am trying to piece meal my VBA where I need it to select all sheets in the workbook and delete the last row in each sheet. Each sheet has the same headers but varies in row so as long as it is the last row being deleted it will work. Any pointers would be greatly...

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