shtname

  1. keiserj

    <> vbNullString Then

    Having to trouble getting this code to work. Used all last year and now always running debug and I'm struggling to figure out why? Private Sub CommandButton1_Click()Dim ws As Worksheet Dim shtname As String Dim codes As String If Workbook.TextBox1.Text <> vbNullString Then MsgBox "Need...
  2. U

    Duplicate Sheet and Rename based on Sheet Count

    Hello people, I am trying to duplicate sheet every time a user click on a button and it will be rename into a sequence. For example i have sheets ABC, DEF, GHI and the master to duplicate from is 99. Hence the sheet count is 4. When it is being copied from 99, i want the duplicated sheet to...
  3. R

    Looping through unique values in a list to print worksheets matching the criteria

    Hi I'm trying to, loop through a list on my index sheet which contains the worksheet names and a location, and print to PDF for each unique location. Currently the macro is manually making each unique value equal the location, but i would like to automate it, The code that i'm using is as...
  4. E

    Macro help copy text box but keep the same textbox name.

    Hi All, Thanks for taking a look at this to see if you can help. I have the following macro in use and it works great. Only problem is after this macro creates my new sheet I have another formula in place that will not work because, when the new sheet is created the text box names change...
  5. J

    VBA - Email Loop Issue

    Hi all, I’ve spent some time creating (and also modifying from RonDe Bruin) an emailer, where basically my control page (named SYSINI) has namesin column A, email addresses in column B and a Yes or No in column D. If D2 says Yes: Copy page called “Emailer”,rename to the email address...
  6. B

    sheet name with cell string in vba

    i want to know how to use a string in VBA to find a worksheet based on the contents of a cell i thought this would work but cant seemed to figure out what keeps throwng an error Code: Private Sub CommandButton1_Click() Dim shtName As String Dim rngAddress As String shtName = Range("b5").Value...
  7. M

    VBA Move between sheets

    Hi I'm using a code to move between sheets, but when I go back and forth it does not work. Is there a way to use this code better? Sub abcd() Dim sht As Worksheet Dim cell As Range Dim actWsh As String Application.ScreenUpdating = False For Each sht In...
  8. J

    IsError VBA for a non numeric logic

    Does anyone know how to make this work? Sub Test1 () Dim ShtName As String Dim ShtError As String If IsError(Sheets(ShtName).Copy) = True Then ShtError = ShtName & " cannot be copied due to it not existing" GoTo Quit2: Else Sheets(ShtName).Copy MsgBox(Shtname & " successfully copied")...
  9. J

    Help With Updating a Global Variable from another Module

    Good Afternoon, I am having some trouble getting something to work. The below code works flawlessly if they are all in the same module. However what I am trying to do is to have the subs for Module 2-4 be in separate modules. But still update the global variable (ShtName) in the sub...

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