|
-
Aug 21st, 2003, 09:00 AM
#1
Thread Starter
Hyperactive Member
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.
-
Aug 25th, 2003, 04:28 PM
#2
Addicted Member
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
-
Aug 25th, 2003, 05:16 PM
#3
Addicted Member
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
-
Aug 26th, 2003, 12:49 AM
#4
Thread Starter
Hyperactive Member
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
-
Aug 26th, 2003, 08:22 AM
#5
Addicted Member
im sorry I cant understand exactly what you want can you elaborate please
or send the spreadsheet
thanks
-
Aug 26th, 2003, 08:54 AM
#6
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|