Results 1 to 6 of 6

Thread: Urgent Help needed from VBA Guru. Please [RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    Urgent Help needed from VBA Guru. Please [RESOLVED]

    Greetings,

    I need to create for a friend a small sheet which has one function.

    Existing
    a button on row/col 1 and in row 1 col 2 starting a whol month (1 col = 1 day)
    in col 1 up from row 2
    the column contains names.

    If I put now the curser into any field in this matrix and the button is pressed then from this curser pos. the next 4 cells become green the next 2 whith and 4 green and 2 white again and so on.

    The looping I can do I am from the VB corner but I never used VBA. So I need at least a entrie point wher I can get this infos how to do or a solution from the forum.

    Any help is apreciated. Many thanks in advance
    Manfred
    Last edited by Bongo; Aug 26th, 2003 at 07:12 AM.

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Location
    houston
    Posts
    185
    Public Sub datefind()
    Dim sCell As Range




    For Each sCell In Selection
    If IsDate(sCell.Value) Then sCell.Interior.ColorIndex = 6
    Next
    End Sub
    OR
    Public Sub datefind()
    Dim sCell As Range




    For Each sCell In Selection
    If IsDate(sCell.Value) Then MsgBox (sCell.Address)
    Next
    End Sub
    AND
    PLACE SCELL.ADDRESS IN ANOTHER CELL

  3. #3
    Addicted Member
    Join Date
    Aug 2003
    Location
    houston
    Posts
    185
    sorry wrong code



    ActiveCell.Activate
    ActiveCell.Resize(1, 4).Interior.ColorIndex = 6
    ActiveCell.Offset(0, 4).Select
    ActiveCell.Activate
    ActiveCell.Resize(1, 2).Interior.ColorIndex = 2
    ActiveCell.Offset(0, 2).Select
    ActiveCell.Activate
    ActiveCell.Resize(1, 4).Interior.ColorIndex = 6
    'etc

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395
    Thanks adocwra,

    got it now. I have two other q.

    I fixed the first 2 rows horizontal.

    1. How can i fix the first column as well?
    2. How can i make sure the fixed first 2 rows are
    not scrollable (horizontal)

    many thanks again
    Manfred

  5. #5
    Addicted Member
    Join Date
    Aug 2003
    Location
    houston
    Posts
    185
    im sorry I cant understand exactly what you want can you elaborate please

    or send the spreadsheet
    thanks

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395
    is ok. I solved it. What I tryed to say was

    How can I fix row 1 and column 1 together. Found the solution on the net.

    Sorry for confusing you but english is not my first language.

    Take care
    Manfred

Posting Permissions

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



Click Here to Expand Forum to Full Width