Computing.Net > Forums > Office Software > Excel VBA

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel VBA

Reply to Message Icon

Name: imtiaz
Date: March 10, 2004 at 07:56:04 Pacific
OS: 2000
CPU/Ram: 256
Comment:

Hi friends
I have a code which is working properly. I have 31 sheets and I have to Change the sheet No(from 1 to 31) on every sheet. My requirement is that this code should be written only Once in my file.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

c = ActiveCell.Column
r = ActiveCell.Row

If c > 1 Then
c = c - 1
End If

If ActiveCell.Column = 2 And ActiveCell.Value = "" And Sheet2.Cells(r, c) <> "" Then
ActiveCell.FormulaR1C1 = Time
End If

End Sub

Plz Plz tell me the solution. I will be very thankful to u.



Sponsored Link
Ads by Google

Response Number 1
Name: Report_2
Date: March 10, 2004 at 16:16:03 Pacific
Reply:

I do not know your answer but I do know that you are using the worksheet property instead of a workbook property so your macro is limited to the worksheet.

If you do not receive an acceptable answer to this query here I recommend you post it at the Ozgrid Excel/VBA forum board as it specialized in such questions.
They are very good.

Regards,
Bryan


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel VBA

Excel VBA and Access communication www.computing.net/answers/office/excel-vba-and-access-communication-/4755.html

COM & LPT Communication - Excel VBA www.computing.net/answers/office/com-amp-lpt-communication-excel-vba/3875.html

Excel VBA code www.computing.net/answers/office/excel-vba-code/4587.html