Consulting

Results 1 to 4 of 4

Thread: Solved: make certain cells visible

  1. #1

    Solved: make certain cells visible

    Hi all,
    I am new to VBA and am working on stores inventory management project.
    I have 2 columns, "cartridge code" and "stock present", as it is a long list, i have to display only first 10 of them and to scroll for others. And when a cell is updated it should be visible in first row followed by others. I need a code or macro for this. Please help!!

    Thanks in advance

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Try this
    [vba]
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column < 3 And Target.Row > 2 And Target.Cells.Count = 1 Then
    Application.EnableEvents = False
    Target.EntireRow.Cut
    Cells(2, 1).Insert
    Application.EnableEvents = True
    End If
    End Sub

    [/vba]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    Thanks a bunch mdmackillop,
    it worked great
    I have two columns
    Cartridge Part Num Available stock
    C6OOX4 20
    CG5643 177
    CKX647 10
    CLU73 26
    CX142 79
    CV765 12

    And it goes on, there are around 150 cartridges. My problem is that I have to display only first 10 among those and insert a vertical scroll bar, so that user scrolls down to see the remaining. I tried many codes but of no use.I am out of time Please help....

  4. #4
    Thanks a million mdmackillop...
    I freezed the planes and Everything worked simply great

Posting Permissions

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