Results 1 to 14 of 14

Highligt row of active cell, error in macro

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-08-2018
    Location
    Denmark
    MS-Off Ver
    2016 for Windows
    Posts
    413

    Highligt row of active cell, error in macro

    I can't get this to work??
    I want ActiveWindow.ScrollRow to scroll down to the row = the RowNum

    Can someone crack this for me please.

    ' Go to data sheet and select Todays date and Highlight Row

    Public Sub GoData()
    Dim RowNum As Integer
    ThisWorkBook.Worksheets("DATA").Select
    
    Call UnProtectSheets(GetMasterPassword(), "DATA")
    
    RowNum = ThisWorkBook.Worksheets("ENGINE").Range("D9").Value ' today - startdate = number
    
    'Scroll down to today
    ActiveWindow.ScrollRow = RowNum
    
    'Settings
    ActiveSheet.UsedRange.Font.Bold = False
    ActiveCell.EntireRow.Font.Bold = True
    ActiveCell(-6).EntireRow.Font.Bold = True
    
    'Clear previous color settings
    ActiveSheet.Range("D8:CW1000").Interior.ColorIndex = 0
    ActiveCell.EntireRow.Columns("D:CW").Interior.ColorIndex = 4 ' Today
    ActiveCell(-6).EntireRow.Columns("D:CW").Interior.ColorIndex = 27 ' Last Week
    
    Call ProtectSheets(GetMasterPassword(), "DATA")
    
    End Sub
    Last edited by nordicdust; 07-29-2018 at 04:20 PM. Reason: I forgot code wrap

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Simple macro/VBA to copy cell above active cell and then move active cell one right...
    By planetjed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2018, 02:02 PM
  2. Replies: 1
    Last Post: 04-06-2016, 11:21 AM
  3. Replies: 9
    Last Post: 02-08-2016, 12:55 PM
  4. Highlight Active Row macro, and Bold the Active Cell
    By StudentTeacher in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2013, 07:43 PM
  5. Highlight Active Row macro error
    By rasmus1166 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-04-2011, 08:46 AM
  6. Active sheet.paste error - macro
    By plato in forum Excel General
    Replies: 5
    Last Post: 02-06-2010, 09:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1