fname

  1. L

    Dialog box is appearing twice before saving

    I have written the SUB below - when I clicked [X] it is working all right - but the dialog box is appearing twice before saving. When I used the SAVE Icon - it does the same thing BUT there's a prompt that say "Excel has stop working" - when I ignore the prompt - it saves the file. I am trying...
  2. J

    Emailing PDF quote to client assistance please.

    this is what i am working with. Italic Bold is the part that seems to be the issue so far :) Sub sendexcelfileaspdf() ''clickone tools, Reference, create a referance Dim outlookapp As Outlook.Application Dim emitem As Object Dim recipient As String, Subject As String Dim message As String...
  3. S

    Vba to import data from Access to Excel

    Hi, im newbie in vba excel... and im bad in english... I want to import data from access table into excel with just select the filename and then its done... before it is succeed to import from txt file with this folowing script : Sub ImportTextFile() Application.ScreenUpdating = False...
  4. P

    Infinite Loop Help

    As the title states my msgbox within my userform is stuck in an infinite loop. I decided to include every command button code there is on this form in case it will help to solve this problem. Also there is also one textbox as well. I've tried various types of loops except the For Loop because...
  5. L

    file save as dialogbox date - error

    Hello VBA beginner here. I am trying to make a Macro command, that will open an old file, then use a dialog box to ask user to enter a date and use this date to partially re-name the file and save into a new file. (Then I move some data from another file into this renamed file). But excel...
  6. P

    Compile error help and centering Title on userform

    The below code gives me a compiling error. "Compile error: Wrong number of arguments or invalid property assignment" The error seems to occur on the .Filters.Add The .Add is highlighted in blue if that helps. How can I center the title text on a userform. Private Sub cmdBrowse_Click()...
  7. P

    Error exporting to PDF

    I get a "Run-time Error 5 - Invalid procedure call or argument" on the ExportAsFixedFormat to PDF. The preceding save to .jpg works so I am stumped. I know the PDF export interacts with my printer settings so maybe that's an issue. The ChartObject height and width are 1000 so could that be a...
  8. B

    VBA print to PDF

    Hello, I have been using the following vba code in order to print all the page from excel to pdf, but it somehow stopped working. Could somebody help me to resolve the issue? Sub createPDFfiles() Dim ws As Worksheet Dim Fname As String For Each ws In ActiveWorkbook.Worksheets...
  9. H

    importing specific columns / sheet names from a file location

    Good day all, I am using this script below and was wondering if anyone could help me out altering a bit as my VBA knowledge is lacking. I need it to just import column E and A from the specific files as well as add the file name to the import. Is this possible? Any help would be...
  10. J

    Close a known open workbook

    Hi Everyone, This is related to previous post, but i'm hoping I'm explaining this a bit better this time. I have a code that will save a .xlsm as a new .xlsx with a timestamp, but its throwing an error when i'm trying to close the original spreadsheet. When i attempt to activate the original...
  11. I

    VBA: How to save excel file as a separate .txt file

    Hi, I currently have the following code to save an Excel file as a .txt file. Sub Macro1() 'Saves the Activesheet to the Desktop as a text file with a different extension Dim newFile As String, fName As String, gName, fileSaveName gName = "FGM_" newFile = gName & Format$(Date...
  12. S

    Allow user to choose which text file to import

    Hi I am trying to create a macro to allow a user to select a text file and import it into a sheet in the same workbook, but i just cant understand why this code i have is not working, please could someone point me in the right direct as to where im going wrong. Sub SelectFile() Dim fName...
  13. Arie Bos

    save sheets as PDF

    I have a workbook with 20 sheets with names starting with "LP", so LP01, LP02, LP03 ...LP20. There are also 4 other sheets with other names, not in the LP range. I have the code below to save all sheets as PDF with names as follows: "B-II [18_05] LP01. John.pdf", "B-II [18_05] LP02. Peter.pdf"...
  14. S

    Load ListBox through MFDialogboxFolder

    Hi All, I am trying to load a listbox through MFDialogbox Picker. Unfortunately, its not working. Request your help. Below is the code, I am using. Thanks Private Sub UserForm_Initialize() Dim myfiles As String, mypath As String Dim fileList() As String Dim fName As String Dim...
  15. S

    VBA: Capture Computer Name and Insert it into String.

    Hello, I'd like to be able to send this file to other people and have it work for them, without having to go through some of the VBA editing that I must go through presently. The macro works fine, but when it goes all the way to the file destination, it says that nothing is present. What this...
  16. M

    "Copy method of Sheets class failed" VBA error

    Hi all, I am trying to create a formula that will copy a worksheet from my activeworkbook to a new document and save. I have the below code, but when I run it I get an error: "Copy method of Sheets class failed" The sheet is not protected (which was my first guess). Any idea how to solve...
  17. S

    Using a wildcard asterisk to get a file and unzip it

    Hello guys, I'm completely new to VBA. My task is I have a certain zip file on my Downloads, I should unzip the file. With file name known, I'm able to unzip it but the problem is : I don't know the entire file name ("xxx-065-xxx"). I've tried the code below. It indeed shows me that the file...
  18. K

    Save to PDF and attach to mail

    Hi trying to utilize the following code but seems to be hitting a bug somewhere Issue 1. The code is meant to be executed by pressing a button. Which is on Sheet 2 and the page that gets PDF-ed is Sheet 1. The code works perfectly for this part but saves it in random folders depending on where...
  19. B

    VBA - Save As Text (Tab Delimited)

    I have inherited a workbook that is in need of some maintenance. There is one area where I'm a little stumped. At the end of the macro I am working on, I need it to save a single sheet as a Text (Tab Delimited) file. The macro that I inherited contains this: fname =...
  20. C

    VBA: too many charts to copy then format

    I have been asked to copy 45 sheets into a management pack and then save this pack as .xlsx and .pdf So far so easy, but each sheet has two charts on and something happens when the sheets are copied to change all the format colours when they are pasted into the new workbook. Since the charts...

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