Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Hidden worksheet

Why wont the following code work on a hidden worksheet? UserForm2 will be
used to place data on the hidden worksheet.


Private Sub CommandButton1_Click()
Unload UserForm3
Sheets("Engraving Jobs").Select
Range("A1").Select
UserForm2.Show
'Module3.Fill_ID_Down
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hidden worksheet

You can't select a hidden worksheet, but you don't need to

Private Sub CommandButton1_Click()
Unload UserForm3
UserForm2.Show
Module3.Fill_ID_Down Sheets("Engraving Jobs")
End Sub

Change the Fill_ID_Down code to accept a worksheet reference and work with
that sheet without selecting it.

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
Why wont the following code work on a hidden worksheet? UserForm2 will be
used to place data on the hidden worksheet.


Private Sub CommandButton1_Click()
Unload UserForm3
Sheets("Engraving Jobs").Select
Range("A1").Select
UserForm2.Show
'Module3.Fill_ID_Down
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Hidden worksheet

I am afraid you lost me. I entered the code as you suggested but I get the
following error "compile error wrong number of arguments or invalid
property assignment" and when I click on debug .Fill_ID_Down Sheets (of
the line Module3.Fill_ID_Down Sheets("Engraving Jobs")) is highlighted.

You also mentioned Changing the Fill_ID_Down code to accept a worksheet
reference and work with that sheet without selecting it. Below is the Sub
Fill_ID_Down() and it does not reference the worksheet.


Sub Fill_ID_Down()
'
' Fill ID down Macro

Range("A" & Rows.Count).End(xlUp).AutoFill _
Destination:=Range("A" & Rows.Count).End(xlUp).Resize(2)

End Sub

End Sub
"Tom Ogilvy" wrote in message
...
You can't select a hidden worksheet, but you don't need to

Private Sub CommandButton1_Click()
Unload UserForm3
UserForm2.Show
Module3.Fill_ID_Down Sheets("Engraving Jobs")
End Sub

Change the Fill_ID_Down code to accept a worksheet reference and work with
that sheet without selecting it.

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
Why wont the following code work on a hidden worksheet? UserForm2 will

be
used to place data on the hidden worksheet.


Private Sub CommandButton1_Click()
Unload UserForm3
Sheets("Engraving Jobs").Select
Range("A1").Select
UserForm2.Show
'Module3.Fill_ID_Down
End Sub






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hidden worksheet

You get the error because you didn't modify Fill_ID_Down

Sub Fill_ID_Down(wks as Variant)
'
' Fill ID down Macro

With wks
.Range("A" & .Rows.Count).End(xlUp).AutoFill _
Destination:=.Range("A" & .Rows.Count).End(xlUp).Resize(2)
End with

End Sub

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
I am afraid you lost me. I entered the code as you suggested but I get the
following error "compile error wrong number of arguments or invalid
property assignment" and when I click on debug .Fill_ID_Down Sheets (of
the line Module3.Fill_ID_Down Sheets("Engraving Jobs")) is highlighted.

You also mentioned Changing the Fill_ID_Down code to accept a worksheet
reference and work with that sheet without selecting it. Below is the Sub
Fill_ID_Down() and it does not reference the worksheet.


Sub Fill_ID_Down()
'
' Fill ID down Macro

Range("A" & Rows.Count).End(xlUp).AutoFill _
Destination:=Range("A" & Rows.Count).End(xlUp).Resize(2)

End Sub

End Sub
"Tom Ogilvy" wrote in message
...
You can't select a hidden worksheet, but you don't need to

Private Sub CommandButton1_Click()
Unload UserForm3
UserForm2.Show
Module3.Fill_ID_Down Sheets("Engraving Jobs")
End Sub

Change the Fill_ID_Down code to accept a worksheet reference and work

with
that sheet without selecting it.

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
Why wont the following code work on a hidden worksheet? UserForm2 will

be
used to place data on the hidden worksheet.


Private Sub CommandButton1_Click()
Unload UserForm3
Sheets("Engraving Jobs").Select
Range("A1").Select
UserForm2.Show
'Module3.Fill_ID_Down
End Sub








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
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da Tammy Excel Discussion (Misc queries) 3 April 2nd 09 11:40 PM
Hidden Columns No Longer Hidden after Copying Worksheet? EV Nelson Excel Discussion (Misc queries) 1 December 6th 06 05:10 PM
How do I detect hidden worksheets or hidden data on a worksheet? Alice Excel Discussion (Misc queries) 4 August 24th 06 03:38 AM
Where's the hidden worksheet? slamm Charts and Charting in Excel 3 July 25th 05 02:31 AM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM


All times are GMT +1. The time now is 03:58 PM.

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

About Us

"It's about Microsoft Excel"