Hello Mr. Bharghav,
1. To assigne a cell value to the macro, use following:-
Sub test()
Dim a As String
a = Range(a1).Value
End Sub
' here the value which is there in Cell A1 has been assigned to macro for
characted a.
2. Go to Tools - Protection - Allow users to Edit Ranges. click on New
and
Hi,
I think it will work better without using any variable.
Try using the below code
Sub PasteAsValue()
Range(A1).Copy
Range(A1).PasteSpecial xlPasteValues
End Sub
Regards,
Manish Purohit
Imagination is more important than knowledge. Knowledge is limited.
Imagination
I have absolutely no idea what your talking about in question 1.
Question 2: You need to make a macro that is started every time the
workbook is closed.
Private Sub Workbook_BeforeClose in your ThisWorkbook sheet. There
you can pretty much do whatever you want. I just don't know if you
want to
Hi,
That could be done by saving A1 to a variable, then clearing the sheet, then
re-populate A1.
Something like:
A = Range(A1).Value
ActiveSheet.Cells.ClearContents
Range(A1) = A
Regards - Dave.
Date: Tue, 14 Jul 2009 12:28:09 +0530
Subject: $$Excel-Macros$$ 1Hardcode a cell