Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Entering a number on any sheet one time only | Excel Discussion (Misc queries) | |||
Entering Data in multiple cells on one sheet & having it auto upda | Excel Worksheet Functions | |||
entering formulas on a sheet | Excel Programming | |||
Entering Data in 1 Worksheet to appear in a specific format in Sheet 2 | Excel Programming | |||
Entering 1 line of data values that will show up in a second Sheet? | Excel Programming |