View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Leanne M (Aussie) Leanne M (Aussie) is offline
external usenet poster
 
Posts: 53
Default Keep a record of entries in cells

Hi Kassie,

the next pair would be copied from the same location but they would need to
be copied to A4 & C4. The number of times I need to do this is variable.

The location they are copied from is kind of a template so would be changed
each time.

Hope this makes sense.

Leanne
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


"Kassie" wrote:

I would require a lot more info to assist you further! In your example, you
copied from C6 and C14. Where would the next pair be situated - C7 and C15,
or D6 and D14, or what? How many lines do you want to copy, or is this
variable?

Aussies go to the UK, S Africans to Aus, and so it goes on!
--
Hth

Kassie Kasselman
Change xxx to hotmail


"Leanne M (Aussie)" wrote:

Thank you this works.

How do I now get it to go to the next blank row so that I can continue to
record the data?

Leanne
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


"Kassie" wrote:

Although cumbersome code, it works?
You can reduce it to the following:

Dim wS1, wS2 as Worksheet

Private sub Test()
Set wS1 as = Worksheets("Sheet1")
Set wS2 = Worksheets("Sheet3")
wS1.Range("C6").Copy wS2.Range("A3")
wS1.Range("C14").Copy wS2.Range("C3")
wS2.Range("B3") = "=TODAY()"
wS1.Activate
End Sub
--
Hth

Kassie Kasselman
Change xxx to hotmail


"Leanne M (Aussie)" wrote:

Hi,

What I am trying to do is when a button is clicked I want the information to
be recorded. I have just used a basic macro to copy and paste and to enter
the date but it does not work.

I think I may need to use more complicated coding and in this case
HELP!!!!!!!!!!!!!!!!!!!!!

This is what I have used for the first part of the process -

Private Sub CommandButton1_Click()
Range("C6").Select
Selection.Copy
Sheets("Sheet3").Select
Range("A3").Select
ActiveSheet.Paste
Range("B3").Select
Sheets("Sheet1").Select
Range("C14").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
Range("C3").Select
ActiveSheet.Paste
Range("B3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("B4").Select
Sheets("Sheet1").Select
End Sub

Here is what I want to do - (at this stage)
Click button Confirm
Have details from C6 & C14 recorded somewhere (currently a new sheet but not
important) and date stamped.
This will allow me to keep a record of stock taken.

Thanks in advance
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)