strdir

  1. B

    excel vba save worksheet as pdf.

    I'm having issues with this code not saving my file. I get an error 1004. it worked before. does any one see any issues with this code? Option Explicit Sub SaveAsPDF() Dim strDir As String strDir = CreateObject("WScript.Shell").specialfolders("Desktop") & "\Daily Reports\" If...
  2. B

    check if folder exist with wildcards

    I would like to use a wildcard to check if a folder exist. i have tried the following: "C:\Users\*\Desktop\New folder" "C:\Users" & "*" & "\Desktop\New folder" "C:\Users\ + "*" + "\Desktop\New folder" i get, "bad file name or number." is there a way to do this? Sub TestForDir()Dim strDir As...
  3. M

    Is there a way to trigger a sub from inside another sub?

    I have a commandbutton_click sub that I would like to code so that a folder is created. Is there a way to call on a function/sub and to have it run its code and then go back to the commandbutton_click sub to finish? The function is below... Function MkDir(strDir As String, strPath As String)...
  4. D

    change specific file extension

    How change specific file extension ? Sub changeExt() strDir = ThisWorkbook.Path & "\" Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(strDir) With CreateObject("wscript.shell") For Each file In f.Files If...

Watch MrExcel Video

This Week's Hot Topics

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
Top