set

  1. T

    Messagebox listing going down instead of across

    The code below lists the address of all cells in a pre-defined range whose value is zero. Dim Rng As Range With ws Set Rng = .Range(.Cells(1, 1), .Cells(1,1000)) End With Dim ZeroColl As Collection Set ZeroColl = New Collection Dim...
  2. K

    Supress Columns with zero values by using VBA

    Hi, Would appreciate some help with this error message received for "Suppressing zero value columns" in a spreadsheet. The VBA code is not made by me and I'm not familiar with using VBA coding, thus I'm completely blank on how to fix it. Sub hide() Application.ScreenUpdating = False Dim...
  3. W

    SAP RFC "RFC_READ_TABLE" can search for job names like "*" and "%" of sm37

    English is not good, please forgive me You can search for information by giving the full name with the job name. How to search like sm37, you can use * or % search range Like this StrMaterial = "888_A31-YCH-*" But it doesn't work, so there should be other ways, or the instructions of the...
  4. A

    VBA - Paste Data AS a table

    Hi all, Im using the below macro to copy filtered data from a table on one worksheet, and paste it on a new worksheet, below the last used row. This all works perfectly fine and as expected, but ideally i want the PASTED data (on Sheet4) to be pasted as a table. Is this possible and easy to...
  5. L

    Temp File Folder in MAC vs Windows

    Hi Experts! I have a line item in my vba that saves an excel file in a temporary folder and then attach in an outlook email. It perfectly works on a normal laptop but when my co-worker tried it in his mac, the vba is debugging showing a run time error '1004': Microsoft Excel cannot access the...
  6. G

    A little code help on Excel Save to PDF

    I'm new at coding. I have put together a code to save several worksheets to a pdf file and it is working except I can't figure out how to have it let me pick the filename and path. As it is it just overwrites the previously saved file. TIA Public Sub SaveSheetsAsPDF() Dim wksAllSheets As...
  7. J

    Problem handling a run-time 91

    '/////////////////////////////Variable Declaration////////////////////////////////////////////////// Dim masterData As Worksheet, console As Worksheet, inputCell As Range, firstNames As Range, lastName As Range, countWhichName As Range 'EZ refs for sheets/ranges Dim client As String...
  8. tourless

    Runs on one but not another

    Hi Folks, I've got this code... Option Explicit Sub TransferToMain() Dim sourceWB As Workbook, destWB As Workbook Dim fName As String, strName As String Dim weDate As Date Dim iWeekDay As Integer Dim LastRow As Long 'Set Source & Copy Sheet To Production File...
  9. F

    VBA code to automatically save pdf file and also without displaying it

    I have a code that populate word documents then prints to pdf. The problem is I have to click SAVE for each one then the display of the PDF opens. Is there a way to automatically SAVE and also prevent the preview from coming up? Any help would be greatly appreciated. Below is the code: Sub...
  10. S

    Code Error

    Could someone please help me out with this, im pretty green with coding, and the orange part is getting an error, thanks Sub Empl_Load() Dim EmpRow As Long Dim EmpCol As Long With Sheet1 If .Range("B5").Value = Empty Then MsgBox "Please enter a valid Employee from the drop down...
  11. T

    Change axis bounds in Excel based on data

    I am creating many line graphs and would like to know of a way to change the vertical axis bound minimum and maximum based on the data itself? For example for set of data, the amounts ranges from 6 million to 12 million while another data set ranges from 3 thousand to 5 thousand. Same graph just...
  12. L

    Accessing a shared inbox from outlook to VBA

    Hello, I have written some code that retrieves the number of mails from two inboxes. I've tested it locally however when I am trying to connect to a Shared Inbox, it returns a 0. I am very confused and I am wondering if someone can help me. The names of the two shared inboxes are 1) FolderA and...
  13. F

    VBA Fill in Word Template and save as PDF

    I'm looking for some help tweaking this code. I have data in an excel sheet and a Word template. It will fill in the template but when it goes to save it pops up and I have to manually save it. I want it to save and move on to the next line. Any help would be appreciated. The code I have so...
  14. S

    Set a shortcut key for "Copy Format"

    Hi, Is there a way to set a shortcut key for "Copy Format" ? Or use VBA to imitate the usual mouse-click / mouse-double-click function of "Copy Format" Thanks a lot!
  15. T

    Pasting selection into sheet in another workbook fails if excel is opened in another instance

    I have a spreadsheet that imports data from a different workbook to import and update items in the destination book by pasting data from the second workbook... It all works absolutely fine - although in some cases when the second workbook (with the data to import) is opened, it opens in a new...
  16. L

    VBA PDF Export printing 1 page

    I have used this VBA code for publishing a PDF report which does work, but what it is doing is showing 2 blank pages below the PDF report been published. Is there anyway to say to the report to export just the range I want leaving just 1 page instead of throwing out good paper!. Private Sub...
  17. L

    copy a sheet to a close workbook - vba

    Hi In the code below, this line of code Set closedBook = Workbooks.Open("D:\Dropbox\excel\articles\example.xlsm") Not sure why I need "Set closedBook". Let say I have one Workbook open, which is Workbooks(1). If I do this code Workbooks.Open("D:\Dropbox\excel\articles\example.xlsm")...
  18. Z

    VBA - PowerShell stdOut and waitOnReturn Required

    I'm not the best at this, but it appears there are (at least) two ways to call a PowerShell script from vba one is to use .Run and the other is to use .Exec RUN let's you add a parameter called waitOnReturn EXEC let's you read the output of the script via .StdOut.ReadAll But I need to do both...
  19. J

    Using VBA to find the address of maximum in a range containing formulae

    Excel 2007 VBA I have a spreadsheet which currently uses the database functions and VBA to to select specific rows of the 'Database' area("A7:A48") and store them as a continuous block of data in the 'Extract' area("U7:AM48"). In this case the data is stored as values and I have no problems...
  20. J

    Email visible entries only (filtered) with VBA

    Hi all. I am unable to attach files for some reason (it says I do not have permissions to) so, please bear with me. I have created a sheet that looks like this: https://imgur.com/a/7pnr4M1 I have the following VBA doing the job: Sub EmaiList() Dim OutApp As Object Dim OutMail 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