View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Axel Axel is offline
external usenet poster
 
Posts: 40
Default The differents of the sheets name and caption.

How do i paste the cellvalue in sheet2 range("C2") from
sheet("Ark1)range ("I14").
The user of the workbook has given sheet2 a new name when this macro i
running. So I has to use the "Real" name of the sheet.
The normal copy and paste only work with the "caption" of the sheet.
the ("Ark1")sheet is beeing deleted after, so I can't use a hyperlink.
The problem is at line 08-09.
Does sombody have a suggestion to my challenge please!


01. Private Sub CommandButton3_Click()
02. Dim c As range
03. Set c = ActiveCell
04. range("I14").Select
05. If IsEmpty(c) Then GoTo line2 Else GoTo line1
06. line1:
07. Sheet2.Visible = True
08. Sheet2.range("C2") = Worksheets("Ark1").range _
09. ("I14").Value
10. Sheet2.Name = Worksheets("Ark1").range("N14").Value
11. Line2:
12.
13. 'same thing here
14. End sub

Mvh Aksel

*** Sent via Developersdex http://www.developersdex.com ***