Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Insert Existing Data

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Insert Existing Data

Your code worked ok for me.

What line causes the error?

Mike wrote:

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.



--

Dave Peterson
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
Insert New Data in Order on an Existing Chart CAlloway Excel Discussion (Misc queries) 5 August 8th 07 03:58 PM
MULTIPLE DATA - How to insert new data into existing data.... Rodorodo Excel Discussion (Misc queries) 0 December 15th 06 11:50 PM
Use excel to insert data at the bottom of existing data Mike Lines Excel Programming 1 October 7th 05 03:43 PM
Insert into existing code gav meredith Excel Programming 0 April 21st 04 02:43 AM


All times are GMT +1. The time now is 11:44 PM.

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

About Us

"It's about Microsoft Excel"