in
All Tags » VBA » worksheet (RSS)

Browse by Tags

  • Is a worksheet proteced... VBA

    I have a worksheet with range F1:L2 on it proteced. Is there a way to have: If Then 'run a routine1 Else 'run a routine2 End if Question: What is the syntax for ? Thank you.
    Posted to Excel (Forum) by microsoft on 03-15-2010
  • Set Font For Workbook or Worksheet Through VBA

    Hi, How can I set the font at the Workbook or Worksheet level so that all cells use this font? Somthing like: objWS.Range(EntireSheet).Font.Name = "arial" except at the beginning of the code, before I know what the range of the entire worksheet is. Thanks
    Posted to Excel (Forum) by microsoft on 01-11-2010
  • Import VBA Module Into Excel Worksheet

    Hi, in code I know how to import a module into a woprk book, but I would like to know how to import a VBA module into a worksheet as my Sub Procedure is using the Worksheet_Change. This is what I use to import a module into my work book oExcel.VBE.ActiveVBProject.VBComponents.Import "C:\REA_ANDREW_Automation_File...
    Posted to Excel (Forum) by microsoft on 09-08-2009
  • Excel VBA reference an object on a worksheet from a different module

    I want the workbook.open event to clear a combo box on a worksheet. The following code gives me a compile error: method or data meber not found. How do you refer to an object from another module? Note: I have verified the control is spelled correctly and the public constant (in the modGlobals) refers...
    Posted to Excel (Forum) by microsoft on 08-26-2009
  • Worksheet Tab Color - Programmatically Changing the Color - How To?

    Is it possible to set the worksheet's tab color conditionally based upon the value of cells or the result of a function? If it cannot be done this easily, is it possible, using VBA, to use the Tab property of the Worksheet object to set the Color property of the Tab object? Any and all help would...
    Posted to Excel (Forum) by microsoft on 07-28-2009
  • VBA Copy/Paste Special to New Worksheet

    Can someone please assist me with a VBA routine to duplicate a worksheet to a new worksheet, using paste special? Thanks much, Seth
    Posted to Microsoft Office (Forum) by microsoft on 07-13-2009
  • Worksheet name change... VBA

    When a worksheet name changes by a user, one can include code in either: Private Sub Workbook_Deactivate() or Private Sub Workbook_SheetSelectionChange() However, a user could rename a tab and close the workbook-- without clicking on any other tab (to activate Workbook_Deactivate) or clicking somewhere...
    Posted to Excel (Forum) by microsoft on 07-09-2009
  • Clear workbook contents when it opens

    I'm just tweaking The Boss's Big Calendar Project now. How do I use VBA code to automatically clear the contents of an Excel workbook/worksheet when the file opens? The relevant workbook only has one worksheet which should be empty. Users are directed to open that file, import data from an external...
    Posted to Excel (Forum) by microsoft on 07-07-2009
  • EXCEL VBA problem with worksheet save

    I have written the following vba macro to save a particular worksheet as a separate workbook. Private Sub ExportRptCommandButton_Click() Dim fName As String, FileNm As String 'GET THE NEW FILENAME FROM THE CURRENT SHEET FileNm = ActiveSheet.Range("H1").Value & ActiveSheet.Range("I1"...
    Posted to Excel (Forum) by microsoft on 06-29-2009
  • "Subscript Out of Range" in referencing an Excel worksheet

    With Respect My one line of code is Application.Goto ActiveWorkbook.Worksheets("Table of Contents(Subject)") The idea is to move the workbook to a specific worksheet, on Open. I have tried using both the Tab Name (shown here) and the Code Name of the worksheet, with the same result when I try...
    Posted to Excel (Forum) by microsoft on 06-25-2009
Page 1 of 2 (11 items) 1 2 Next >