#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Macro Not Running

Hi,

I have a macro, With the help of this macro, as soon as u write
anything in Column A it would automatically throws a Current Date in
Column G:


Dim LastRow, LastCol, CurRow, CurCol As Integer

Private Sub Worksheet_Change(ByVal Target As Range)
If LastCol = 1 Then
CurRow = ActiveCell.Row
CurCol = ActiveCell.Column
'MsgBox ActiveCell.Row
'MsgBox ActiveCell.Column

'MsgBox Target

If Sheet1.Cells(LastRow, 7).Value = "" Then
Sheet1.Cells(LastRow, 7).Value = Date
Cells(LastRow, 4).Select
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
LastRow = ActiveCell.Row
LastCol = ActiveCell.Column
'MsgBox ActiveCell.Row
'MsgBox ActiveCell.Column

End Sub


There are other formulas in the Excel Sheet. I had protected the sheet
to hide the formula. but as soon as i protected the sheet, my macro is
not working.


Can u help me how can i run the macro even after i protect the sheet.

Is there any way.

Thanks

Akash
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Macro Not Running

Hi,

I had done that, bt it didnt worked. As soon as i had protected the
sheet with the help of the password. and then as soon as i enter into
column A, the system is throwing an error message like,

The Cell or Chart u r trying to change is protected and therefore read
only,
To modify a protected Cell or a Chart, first remove protection using
Un Protect Sheet Command (Tools Menu, Protection Sub Menu) You may be
prompted for a password.

What can i do? Can i expect any help from ur side.

Thanks

Akash

On Jan 16, 6:26 pm, "Don Guillett" wrote:
Perhaps you could unlock that cell before protecting the sheet.
Right click cellformatprotection

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Akash Maheshwari" wrote in message

...

Hi,


I have a macro, With the help of this macro, as soon as u write
anything in Column A it would automatically throws a Current Date in
Column G:


Dim LastRow, LastCol, CurRow, CurCol As Integer


Private Sub Worksheet_Change(ByVal Target As Range)
If LastCol = 1 Then
CurRow = ActiveCell.Row
CurCol = ActiveCell.Column
'MsgBox ActiveCell.Row
'MsgBox ActiveCell.Column


'MsgBox Target


If Sheet1.Cells(LastRow, 7).Value = "" Then
Sheet1.Cells(LastRow, 7).Value = Date
Cells(LastRow, 4).Select
End If
End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
LastRow = ActiveCell.Row
LastCol = ActiveCell.Column
'MsgBox ActiveCell.Row
'MsgBox ActiveCell.Column


End Sub


There are other formulas in the Excel Sheet. I had protected the sheet
to hide the formula. but as soon as i protected the sheet, my macro is
not working.


Can u help me how can i run the macro even after i protect the sheet.


Is there any way.


Thanks


Akash


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Macro Naveen Excel Discussion (Misc queries) 2 July 14th 07 10:46 AM
Pop-up when running a macro tom Excel Discussion (Misc queries) 5 April 2nd 07 08:55 AM
Event Macro running another macro inside K1KKKA Excel Discussion (Misc queries) 1 December 20th 06 08:21 PM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Running VBA Macro Jeff Excel Discussion (Misc queries) 1 February 15th 05 01:12 PM


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"