filename1

  1. W

    Showing .pdf file in folder with my code

    Hi. I got this code (below), that users submitt some text and values, then it saves the file as a .pdf. This works perfect, but, at the line ***foldername = .SelectedItems(1)*** it opens filebox and lets users select a folder to save the pdf file at, but is there a way to show the existing...
  2. C

    Occasional error with saving macro on sharepoint

    Hi everyone, Newbie question here so any help I get I'll be grateful! I tried using the following script to save a spreadsheet onto sharepoint which i've opened with vba on another spreadsheet. Path = "http://sharepoint.com/" filename1 = " Test File" dtt = Format(CStr(Now), "hhmm")...
  3. N

    how to run autoit file from excel

    im getting a path error for somre reason. what is wrong with my path? Sub Autoit() Dim FileName1 As String FileName1 = "C:\Program Files (x86)\AutoIt3\AutoIt3.exe e:\1\glassshatter.au3" runscript = Shell(FileName1) End Sub
  4. D

    Saving Specific Sheet With VBA

    Private Sub CommandButton1_Click() Dim path As String Dim filename1 As String path = ThisWorkbook.path filename1 = Range("K2").Text Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:=filename1 & ".txt", FileFormat:=xlOpenXMLWorkbook Application.DisplayAlerts = True End Sub...
  5. C

    Creating folder and subfolders

    I have a script that creates a folder (if non already exists) then saves an excel file in this folder and it works great but a new request had come up where I need to create 2 sub folders with in this new folder... 1 called "drawings" and one called "Obsolete" this is my present code: Private...
  6. VBE313

    What is wrong with my code? The line that is not responding is underlined and bolded.

    Dim path1 As String Dim Filename1 As String Application.ScreenUpdating = False path1 = Range("I7").Text Range("A1:f40").Select Selection.Copy Sheets("Laser").Select Sheets.Add After:=ActiveSheet Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone...
  7. P

    run time error 1004

    This is the same formular I saw work however it continualy gives me run time error. Can anyone help?? Private Sub CommandButton1_Click() Dim path As String Dim filename1 As String path = "C:\driver demo" filename1 = Range("D2").Text Application.DisplayAlerts = False ActiveWorkbook.SaveAs...
  8. D

    macro closing when it should'nt

    I have this and it runs when the workbook is open but it closes after it runs. Any help would be great thanks. Private Sub Workbook_open() Dim path As String Dim filename1 As String ' copy and paste Sheets("Sheet1").Cells.Copy Sheets("Sheet1").Cells.PasteSpecial Paste:=xlPasteValues...
  9. R

    Code to move excel file from one folder to another folder

    Hello, I have been unable to find a code that allows me to move the current workbook from one folder into another so I thought of the idea of a save as that saves in the desired folder but also kills the file in the current folder. I have gotten the save to work but not the kill. The file is...
  10. B

    Macro to save sheet as value in cell

    Hi all, I'm trying to write a macro that saves a sheet as a unique name, varying upon the value of a specific field. For example a name I would be after would be "JR Export MAR". This is what I have so far, however it is't working. Sub Macro1() ' ' Macro1 Macro ' ' Dim Filename1 As...
  11. J

    Append filename when saving?

    Hi, I have a macro which runs when the workbook is closing where I can create the filename. Sub shiftchnage() ' ' shiftchnage Macro ' FileName1 = InputBox("Input filename ", "Filename") ActiveWorkbook.Save ChDir "c:\" ActiveWorkbook.SaveAs Filename:="K:\ESS- 2005\Production Meeting\Daily 6...
  12. RJSIGKITS

    VBA 'MkDir' causing run time error for new PC user

    Hi Guys. So, I have a new user for the main PC (Logging in with own PC login details), and the Doc that I need all users on the PC to be able to use has the below lines of code that is currently causing a 'Run Time Error 76 - Path not found' error message for debugging. However, I have compared...
  13. D

    How to Refresh multiple workbook in a directory?

    I am using following code to refresh the workbook. However, If I have more than one workbook (for example 10) then how do I optimize my code. OR Do I have to repeat code 10 times? Any idea, please. Sub refresh() Application.ScreenUpdating = False Dim filename1 As String filename1 =...
  14. tkroper

    VBA code to save file using cell data

    Hi Friends! I'm making my first attempt at VBA, trying to save a file using cell data to a file location. Here's what I have: Private Sub CommandButton1_Click()Dim Path As String Dim FileName1 As String Dim FileName2 As String Path = “H:\Audit Vendor Resources\Quality Review...
  15. M

    VBA save problem with date

    Using Excel 2016, I am trying to create a "save as" button and pull data from 3 cells to save the file. The problem is that cell S2 contains a date (which I need in the file name) but I can't seem to get it to work. When I test it and replace the date with text, it works. Can anyone help. Below...
  16. C

    Automatically save a file on a network drive

    I want to have a button in a workbook that will allow me to save a file name from values in C3 and D3 + add the date and save it to a network drive (eg. o:\customer drawings\ "value B3" \) so to resume 1 I need to check to see if the folder exists, if not create it from value B3... then same...

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