myname

  1. Y

    Import data from already opened workbooks

    Hello all, I have a small code that opens the files in a folder, after asking me when the names should contains. Sub OpenFiles() Dim MyFolder As String Dim MyFile As String Dim MyName As String MyFolder = "C:\Users\xxx\Desktop\New folder\" MyName = InputBox("Please enter name to...
  2. R

    Case VBA

    Hi Guys I have the following vba codes Sub d() Range("b2") = Format(Date, "dd/mmmm/yyyy") Const mydrive = "C:" Const mydir = "Users\rakesh\Desktop\test" Dim myname As String Dim ss As String myname = Sheets("sheet1").Range("e5").Text & Format(Date, "dd-mmm-yy") & ".xls" ss = mydrive & "" &...
  3. N

    Retrieving values for a range of cells in multiple workbooks

    Hi all, been trying to use a macro I've seen here to help me retrieve a range of values of all workbooks in the folder. However, I have 2 problems: 1. It only retrieves one cell and not a range of cells in multiple rows and columns. 2. It seems to hangup when the cell is located in a hidden...
  4. L

    Copy specific cells from all workbooks in folder to single master file.

    Hi Folks, I need some help with copying data from a specific sheet(Aug) of multiple workbooks in a folder to a specific sheet (Sheet1) of the parent workbook. I have tried a code which i learnt from internet but it is returning only the name of file and value of a single cell. Below are the...
  5. C

    Speeding Up Loop Code

    Hi all, Column A in Sheet 1 has 150 Employee ID’s and Column B has their salary.All I’m doing is pasting their salary to the Master sheet (which has 4000ID’s). This process take about 1 minute to complete. Is there a way to speed it up at all? I was wondering if the loop canstop once all 150...
  6. K

    Data extraction based on condition

    Sub transfer() Dim i As Long, j As Long, lastrow1 As Long, lastrow2 As Long Dim myname As String lastrow1 = Sheets("sheet1").Range("A" & Rows.Count).End(xlUp).Row Worksheets("Sheet1").Select Application.ScreenUpdating = False For i = 2 To lastrow1 myname = Sheets("sheet1").Cells(i...
  7. R

    macro save attachments from outlook to share point error

    When I run my code I get run time error 2147024843 and says it cannot save attachment. Can anyone help? Below is my code with debug in blue. Sub SaveAttachmenttoSharePoint() 'Declaration Dim myItems, myItem, myAttachments, myAttachment As Object Dim myOrt As String Dim myOlApp As New...
  8. I

    Type mismatch. Runtime Error 13

    Hello, my friends I m trying to generate alphanumeric ID based on combobox value, but facing error. Type mismatch. Runtime Error 13. Please help me Thanks in advnce Option Explicit Sub GenNextTID() Dim ws As Worksheet Dim lr As Long, x As Long Dim myName As String, lstNum As Variant Set ws...
  9. A

    Import a txt file from a folder in Users

    Hello. I have to import automatically, when I open an excel file, a file txt named myfile.txt. This file is inside the path C:\Users\myname\AppData\Roaming\myfolder. It is easy if the myname was the same in all computers, instead I have to be able to open this file on a computer with different...
  10. L

    VBA loop through computer folder using DIR works but fails to open files (or loop won't work without dir)

    Code: Sub DirectoryLoop MyPath = "c:\*sales*.xls*" ' Set the path. MyName = Dir(MyPath) ' Retrieve the first entry. Do While MyName <> "" ' Start the loop. MsgBox (MyName) Call ProcessFile(MyName) 'This processes each file MyName = Dir() ' Get next entry. Loop End Sub Sub...
  11. L

    Run/Call module in multiple Workbooks.

    I am trying to run a macro in a workbook that opens other workbooks in a file and runs all the vba in Module2 of each specific workbook. Module2 is different in each of the workbooks This is the code i am using. It runs through each of the workbooks perfectly I just need it to run the...

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