Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default entering data on another sheet

Hi All,

I have the below code which i was hoping would work.
It's supposed to enter the varable defined from the userform1 onto another
sheet which doesn't have focus. However, it enters it onto current sheet, not
onto the RecsC sheet.
Can anyone please help? I've tried different combinations, but cant get it
to work.

Cheers.
Tony.

----------------------------------------------------
With Worksheets("RecsC")
Set g = Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
g = UserForm1.strSuppNam
End With


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default entering data on another sheet

Hi Tony,

Try:

With Worksheets("Sheet3")
Set g = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End With
g.Value = UserForm1.strSuppNam

Note the dot before range and the use of the value property of g.

---
Regards,
Norman



"Tony Zappal" wrote in message
...
Hi All,

I have the below code which i was hoping would work.
It's supposed to enter the varable defined from the userform1 onto another
sheet which doesn't have focus. However, it enters it onto current sheet,
not
onto the RecsC sheet.
Can anyone please help? I've tried different combinations, but cant get it
to work.

Cheers.
Tony.

----------------------------------------------------
With Worksheets("RecsC")
Set g = Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
g = UserForm1.strSuppNam
End With




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default entering data on another sheet

Or, disregard the 'with' and try
Set g = Range("'RecsC'!A" & Rows.Count).End(xlUp).Offset(1, 0)
instead of
Set g = Range("A" & Rows.Count).End(xlUp).Offset(1, 0)


"Don Guillett" wrote in message
...
try putting the dot ( . ) before range. Look in help for with.

--
Don Guillett
SalesAid Software

"Tony Zappal" wrote in message
...
Hi All,

I have the below code which i was hoping would work.
It's supposed to enter the varable defined from the userform1 onto

another
sheet which doesn't have focus. However, it enters it onto current

sheet,
not
onto the RecsC sheet.
Can anyone please help? I've tried different combinations, but cant get

it
to work.

Cheers.
Tony.

----------------------------------------------------
With Worksheets("RecsC")
Set g = Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
g = UserForm1.strSuppNam
End With






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default entering data on another sheet

Hi Norman, Don, Tim.

Thank you all for replying. The "dot" in front of range did the trick.
Thanks again.

Cheers.
Tony.

"Tony Zappal" wrote:

Hi All,

I have the below code which i was hoping would work.
It's supposed to enter the varable defined from the userform1 onto another
sheet which doesn't have focus. However, it enters it onto current sheet, not
onto the RecsC sheet.
Can anyone please help? I've tried different combinations, but cant get it
to work.

Cheers.
Tony.

----------------------------------------------------
With Worksheets("RecsC")
Set g = Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
g = UserForm1.strSuppNam
End With




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
Entering a number on any sheet one time only paulrm906 Excel Discussion (Misc queries) 4 April 2nd 06 06:16 AM
Entering Data in multiple cells on one sheet & having it auto upda haynblend Excel Worksheet Functions 2 March 27th 05 12:41 AM
entering formulas on a sheet stu Excel Programming 4 June 26th 04 09:43 PM
Entering Data in 1 Worksheet to appear in a specific format in Sheet 2 iomighty[_3_] Excel Programming 4 June 4th 04 11:49 PM
Entering 1 line of data values that will show up in a second Sheet? iomighty[_2_] Excel Programming 1 June 3rd 04 12:47 AM


All times are GMT +1. The time now is 05:02 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"