sfile

  1. 5

    Data Extraction multiple Sheets & Multiple Cells

    Hey, I have tried to make a macro that I can select a folder and then export all the data from multiple sheets that are identical in layout to one sheet I have come up with this but I cant seem to get it to work, it is always sheet 4 and that's were I seem to be falling down, any ideas? Sub...
  2. P

    Compile error: Invalid or unqualified reference and For Loop Doesn't Loop

    I have a userform with six option buttons and and three textboxes. I would like the code to loop through column G until it finds the first value that equals the value of textbox 3 then offset back three cells and check if that value equals the value in textbox1. Whether it contains the value or...
  3. P

    Runtime Error 91 Object variable or with block variable not set

    On my userform, I have six option buttons and three textboxes. When I run this code I get the following runtime error '91. Option Explicit Dim sPath As String, sFile As String Dim wb As Workbook Dim ws As Worksheet Dim rng As Range Private Sub cmdbtnOpen_Click() sPath =...
  4. K

    Saving files from a folder with Yesterdays date to a folder with Todays DAte

    Hi, I am trying to copy all the files in a folder with Yesterdays date to a folder with Todays date. I have tried sharing the code I have written so far but its not looking like the codes in other posts. Sorry if the code is not loaded correctly. In my main sheet I have created a formula...
  5. A

    Copy Data from 4th sheet in all the workbooks

    Dear All, I want to copy the data from sheet 4 named 'Unique MSISDNs' of all the workbooks in the location. Data to be copied is from A1 to H8. I am facing a problem that data overwrites previous one, data from only last file appears. I am using the below code, please can anyone help me in this.
  6. M

    VBA Save to new workbook

    Hi. Looking for VBA code to save the print area to a new excel document and to be prompted for the file path. I have PDF sorted but can’t seem to get to export to excel document. Thanks. Private Sub CommandButton8_Click() Dim sPath As String Dim sFile As Variant Dim ws As Workbook On Error...
  7. M

    Save all sheets to PDF

    Hi, Looking for VBA to save all sheets to PDF. Currently i have the below, but only saves the active sheet. Thanks. Private Sub CommandButton8_Click() Dim sPath As String Dim sFile As Variant Dim ws As Workbook On Error GoTo ErrHandle sPath = ThisWorkbook.Path & "\" &...
  8. H

    Cancel Button When Importing File

    I'm using the following code to import a another file, I thought I fixed the issue of getting a runtime error, but now it doesn't open the selected file and I get the MSG Box. Dim sPath As String Dim sFile Dim ws1 As Worksheet Set ws1 = Sheet1 sPath = "\\Address\Folder1\Folder2\Folder3" &...
  9. kelly mort

    File path code update needed

    Hello I need help: Dim sfile$, fpath$ With Application Fpath = ThisWorkbook.Path & .pathSeparator & “Pictures” & .pathSeparator sFile = Dir(fPath & .PathSeparator & TextBox1.Text & “.*”) Image1.Picture = LoadPicture(“”) If sFile<>”” Then Image1.Picture = LoadPicture(fPath &...
  10. kelly mort

    Images not switching with printing loop

    Hello again, I am yet into another trouble and I want someone pull me out: My image control is not switching its images when I use the loop to print. It maintains only the first image throughout . So if the first item has no image, then it takes that for all the others. Meanwhile when I...
  11. kelly mort

    Load images from separate folders

    Hi, This code is giving me a headache and I need someone fix it for me. Currently both controls are loading the image from same folder "Picture1". I want the second control to load from "picture2". I have tried some stuffs but the script keeps laughing at me:laugh: . Private Sub...
  12. J

    Macro stopped working- No error messages

    I have a Macro that pulls a particular sheet from all workbooks in a directory and copies it into one workbook (the code is actually in the workbook, it is not in my personal workbook). It then renames these sheets based upon data from the sheet copied. I have been using this macro for several...
  13. P

    Run-time error '91' Help

    All I am trying to do is see if there is a worksheet named (page 2) or a worksheet named (Exhibit "I"), if there is then call Sub deleteWS. However I am getting a Runtime error: 91 on the Bold Print and underlined ws.Name. Not sure what I coded incorrectly. By the way, I recorded a macro to get...
  14. D

    VBA to compare my file names to the file location and add the new values

    Can someone help? (new to VBA) I am trying to create a VBA that looks at my current list of file names in a spreadsheet and finds filenames that are not in my list and populates the spreadsheet with the new filenames. So for example: I have a list of file names in column “I” I need my...
  15. J

    VBA to copy same sheet from multiple workbooks, paste as value in separate worksheets in new workbook

    This thread (replay #7 , specifically) nearly does what I want it to do with two exceptions. Code copied below for expediency (Thanks, Bertie for writing this code!) https://www.mrexcel.com/forum/excel-questions/715760-loop-through-folder-copy-worksheet.html This code copies a particular...
  16. I

    Compile error "Subscript out of range" in simple set statement

    I'm obviously missing a fundamental concept. I have reduced my problem down to a few lines of code, and still can't solve it. Sub tstSbScrptRng() Dim wkBk As Workbook Dim sPath As String Dim sFile As String sPath = "C:\Users\ibud0\Documents\" sFile = "Garbage.xlsx"...
  17. G

    Problems with photo insertion macro

    Hey guys! Long time lurker, just can’t seem to find the solution to my problem. I have a workbook with a sheet that gets pictures inserted into it with text boxes and other notations on top of the photos. Up until now we did all of this manually (insert, resize, send to back, etc). I managed...
  18. M

    error msg "The expression you entered...."

    hello all, I'm New to Mr.Excel (Access too) I get this message - The expression you entered has a function name that Microsoft Access can't find." I copied the VB from a Mr.Excel video about "Auto BackUp" - I'm using 2007-2010 *I need help to resolve this error [code] Sub BackUp() Dim dTime...
  19. Q

    Reading HTML file, but it messes up the text format.

    This is the code I'm using below and I've tried innerHTML and innerTEXT, but it removes any line breaks and such so it's just a wall of text instead of nicely formatted paragraphs. Any ideas on how I can accomplish keeping the text in the same format between the tags? When I view the file in...
  20. kelly mort

    How to extract value from cell with formula other than using the direct change in cell

    Hello All, How do I make this code respond to cells with formulasome instead of the Target? I am running into some troubles and wish there is a way to use cells with formulas instead of direct changing from the cells. Thanks Private Sub Worksheet_Change(ByVal Target As Range) Dim fPath As...

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