sname

  1. A

    VBA to paste value above

    Hey community, I use following formula, to fill blank cells with value above. I wanna know how can i start this code from 5th row and end in 1000 row? in second column? Sub FillBlanksValueAbove()Dim sName As String sName = ActiveSheet.Name Dim ws As Worksheet Dim lastRow As Long, lastCol As...
  2. E

    Transfer selected items from listbox to sheets range and as sheets name

    Hello! I am just new to this site and new to VBA. I have two listboxes (Months and Product Names). I set these to 1-fmMultiSelectMulti. What I wanted is that every time I click OK button new sheets will be added with names as in the listbox(Months) and the selected items from listbox(Product...
  3. G

    How do I break links

    Hi I have part of a macro shown below that moves files into a new subfolder that ive created in a folder called backup. It saves the workbook as NEWSUMMARY1.XLS no problem but im then trying to break the links after the file moved. Any Ideas? Sub PERIODEND() Dim sName As Variant...
  4. G

    Macro has a compile error and cant work out why

    Hi I have the following macro and keep getting a compile error. Any Ideas? Sub test() Dim sName As Variant, bFolder As String, dest As String sName = InputBox("Subfolder name") If sName = "" Then Exit Sub bFolder = "X:\backup" If Dir(bFolder & "" & sName...
  5. G

    Drag and drop emails into vba userform

    Hi, I'm looking for some help, I want to ultimately create an area where I can drag emails into a window within a user form, and then they get automatically copied to a specified directory. I have been trying for days and searched the web but fail every time. I have the following using...
  6. T

    Outlook Macro Attachment Saving

    I am not very savvy with the coding. I found one and lightly modified it to save attachments using the subject name for me. I need assistance on getting it to save the attachments as only part of the subject name. Subject name, "[EXTERNAL] APLORD:214 File for admission 0220X0119AO002198" Needed...
  7. C

    Upgrade to 365 and not finding project or library

    Hi Guys, At wok ad we just upgraded to Office 365, the code below worked great before upgrade, but now I get a compile error to find the project or library on the word "Format" on the "sname" line. It basically formats the date (A4) in a cell copies it and merges it with AM or PM from B4 2 on...
  8. P

    Outlook VBA to save incoming/outgoing messages automatically. I have 2 macros for these, but how do i combine them?

    So i have these 2 macros codes that work separately (if i delete one and keep the other): This one is to save incoming messages automatically as they come in. Option Explicit Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Dim Ns As Outlook.NameSpace Set Ns =...
  9. A

    VBA in MS Outlook to save messages in a newly created folder

    I'm trying to assign a VBA script in MS Outlook so that I can get all emails saved in a newly created folder (named by date, files also named by date). I create a folder and assign name to it: strNewFolderName = Format(dtDate , "yyyymmdd", vbUseSystemDayOfWeek, _ vbUseSystem) sName =...
  10. C

    Copying a Sheet with a New Name as Values Only

    So this is the code that I am using. Sub SaveCount() Dim sName As String Dim i As Integer i = ActiveWorkbook.Worksheets.Count sName = Application.InputBox("Enter a name for the new sheet", "Add sheet") If sName = "" Then Exit Sub Worksheets(2).Copy after:=Worksheets(i) ActiveSheet.Name =...
  11. X

    Export An Outlook Email To PDF File

    Hello, I have this VBA in outlook which is exporting email to PDF format, but there is an issue. If there is image or table in the letter, it does not fit into the PDF page. Maybe someone has an idea how it could be fit? Maybe there is an option to set boundaries? or at least maybe it is...
  12. D

    Mac Excel 15+ SaveAs PDF

    I'm trying to save a sheet in the spreadsheet as a PDF, when it's ran I get the grant permission dialog box as well as the dialog to set the location and specify the file name. The file names are pre-set based on the FN value passed. Example: FN = test.pdf I want to completely bypass the both...
  13. B

    Choose and select files to import instead of hardcoded file folder

    Hi everyone, I have a working macro for import of csv files where they are presented on different worksheets. In the macro the directory where the csv files are is hardcoded ("fs.GetFolder="). This is the working code: Dim fs As New FileSystemObject Dim fo As Folder Dim fi As File Dim WB As...
  14. B

    Create sheetnames based on imported filenames without extension

    Hi everyone, As part of a bigger macro I want to create sheetnames based on imported filenames. I use this code: Dim fs As New FileSystemObject Dim fo As Folder Dim fi As File Dim WB As Workbook Dim ws As Worksheet Dim sname As String Sub loadall() Set WB = ThisWorkbook Set fo =...
  15. N

    pull data from cclosed wb: formulaaray error

    Hi all, been struggling with this one and could use some help. Im trying to pull data from a closed workbook. I have a code that has worked for me in the past. All I have done is edit the path to accommodate for the new workbook, however I keep receiving an error. (1004 unable to set 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