View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Insert Existing Data

Sub getExcelToRunScript()
Const columnA = "A"
Const shName1 = "Sheet1"
Const ShName2 = "Sheet2"
Dim sh1 As Worksheet
Dim sh2 As Worksheet

Set sh1 = Worksheets(shName1)
Set sh2 = Worksheets(ShName2)

sh2.Range(columnA & "1").Value = _
sh1.Range(columnA & "1").Value
End Sub

"FSt1" wrote:

hi
we are not psychics. post your code.

regards
FSt1

"Noob" wrote:

Hey,

I'm a noob at this.. How do I get my VBA script to pull information from a
excel sheet in the same workbook? It's giving me a complie error.