sh.name

  1. K

    Macro Help

    The following macro is designed to split several tabs within a sheet into individual files. What I would like to do is get this part of the macro: Format(Date, " BOB mm-yyyy" to prompt a dialog box once at the beginning of the macro to ask what is the additional name tag the files should use...
  2. S

    Help to check sheet name then do something

    Hi all I have code below work well but I want to change this line: <code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name <> "LocKH" And Sh.Name <> "Ma" Then to <code style="box-sizing: border-box; font-family: inherit; font-size: 1em;">If Sh.Name =...
  3. I

    loop through sheets in the workbook and copy specific range from each sheet to a summary sheet.

    Good morning, I have a spreadsheet with 5 or more sheets and I am trying to create code that will loop through sheets and copy the same range from each sheet to the "Overall Summary" sheet. The range should be copied into the next blank row. Here is the code I have so far, please help. Thank...
  4. jski21

    Limit Macro to Non-Contiguous Range of Cells

    Good day Team, This macro works fine except I need to isolate it to a non-contiguous range of cells (commented out I the code:) Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) 'Inserts a comment box if the cell value is less than 99%...
  5. bobkap

    Move VBA created PDF to new folder

    I have created a macro that creates several different worksheets. I'm using the code below to output each of these newly-created sheets to a .PDF which is then stored in the same folder as the workbook. I'd like to move these new sheets to a new folder created by VBA. This is payroll data...
  6. M

    Password Protect a Worksheet from Viewing

    Hi I want users to be able to click on a worksheet and then be prompted to enter a password before they can view it. I found this on another thread but a row of code is highlighted in red and it doesn't seem to work. I get Compile Error Syntax Error. Public PvSh As String Public Pwd As...
  7. D

    Copying and pasting a specific range in all worksheets but two.

    Hi folks, Situation: I have a specific range---$F$7:$F$13---that I need to copy from all worksheets except two worksheets: sh.name "MACRO" and sh.name "ExtraData". As I don't know how many worksheets I might have to copy $F$7:$F$13 from, I found this macro to faciliate the copy/paste. Public...
  8. P

    Select Case Sh.Name

    Hi All, I'm working with an xlsm parent document where the sheet's tab names changes in producing a new children workbook. My question is is there a way to generically assign a sheet name according to its assigned worksheet#/sheet# in the code below, so I can avoid using over a hundred sheet...
  9. B

    Making a code loop indefinitely

    Hi everyone, I'm new at this. I copied the below code from one of the thread. It works perfectly but I want to make it loop until I decide to cancel it. Thanks in advance. Private Sub Workbook_SheetActivate(ByVal Sh As Object) Dim sh1 As Worksheet, sh2 As Worksheet Set sh1 =...
  10. L

    Hide Sheets Based On Criteria

    Hi, I have a workbook that has sheets called week 1 through to 52 and a sheet called dump. I need to automatically hide from a workbook_open, every sheet BUT the "Dump" and "Week " & X where X is current week number and then the next 3 weeks. For some reason, the code I've created doesn't...
  11. R

    VBA Convert from Array to Non-Array

    I'm looking for some help converting code from array to non-array. I was using Lbound to Ubound with the array. Can you please help adjust this code so that it works in this new format? Thanks for your help with this. If sh.Name = "Closer" Or sh.Name = "Mario" Or sh.Name Like "Fin*" Then...

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