Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default Message Box - More help please !!

Hi,
Thanks to Rowen and Michael for their help with my (simple) question, but I
have another.
The menu button I have created has the following code attached to it

Sub add_monday_jobs()
With Sheets("monday'S LOG").Range("A8:N34")
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset( _
1, 0).Resize(.Rows.Count, .Columns.Count).Value = .Value

End With
MsgBox "All Today's Jobs Added Successfully !", vbInformation
End Sub

However is it possible to use this code so that it will add the required
data to the "log" regardless which sheet is open at the time.
As at present it will only work with worksheet "Monday's Log" and I want it
to do the given task regardless of which worksheet is being used. eg if
'Mondays Log' worksheet is being used then copy that data only, if 'Tuesdays
Log' worksheet is being used then copy that data only..........etc etc

Hope that makes sense, and thanks in advance

Cheers

Anthony

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Message Box - More help please !!

Sub add_Anydays_jobs()
With Activesheet.Range("A8:N34")
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset( _
1, 0).Resize(.Rows.Count, .Columns.Count).Value = .Value

End With
MsgBox "All Today's Jobs Added Successfully !", vbInformation
End Sub

--
Regards,
Tom Ogilvy

"Anthony" wrote in message
...
Hi,
Thanks to Rowen and Michael for their help with my (simple) question, but

I
have another.
The menu button I have created has the following code attached to it

Sub add_monday_jobs()
With Sheets("monday'S LOG").Range("A8:N34")
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset( _
1, 0).Resize(.Rows.Count, .Columns.Count).Value = .Value

End With
MsgBox "All Today's Jobs Added Successfully !", vbInformation
End Sub

However is it possible to use this code so that it will add the required
data to the "log" regardless which sheet is open at the time.
As at present it will only work with worksheet "Monday's Log" and I want

it
to do the given task regardless of which worksheet is being used. eg if
'Mondays Log' worksheet is being used then copy that data only, if

'Tuesdays
Log' worksheet is being used then copy that data only..........etc etc

Hope that makes sense, and thanks in advance

Cheers

Anthony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default Message Box - More help please !!

Tom,
thank you !!!!!!!!!!!!!!!!

regds

Anthony
"Tom Ogilvy" wrote:

Sub add_Anydays_jobs()
With Activesheet.Range("A8:N34")
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset( _
1, 0).Resize(.Rows.Count, .Columns.Count).Value = .Value

End With
MsgBox "All Today's Jobs Added Successfully !", vbInformation
End Sub

--
Regards,
Tom Ogilvy

"Anthony" wrote in message
...
Hi,
Thanks to Rowen and Michael for their help with my (simple) question, but

I
have another.
The menu button I have created has the following code attached to it

Sub add_monday_jobs()
With Sheets("monday'S LOG").Range("A8:N34")
Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset( _
1, 0).Resize(.Rows.Count, .Columns.Count).Value = .Value

End With
MsgBox "All Today's Jobs Added Successfully !", vbInformation
End Sub

However is it possible to use this code so that it will add the required
data to the "log" regardless which sheet is open at the time.
As at present it will only work with worksheet "Monday's Log" and I want

it
to do the given task regardless of which worksheet is being used. eg if
'Mondays Log' worksheet is being used then copy that data only, if

'Tuesdays
Log' worksheet is being used then copy that data only..........etc etc

Hope that makes sense, and thanks in advance

Cheers

Anthony




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
#DIV/0! message rjc_29 Excel Discussion (Misc queries) 1 January 16th 06 12:52 PM
Message Box Greg Excel Discussion (Misc queries) 1 April 11th 05 05:01 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
OWC Message rweide Excel Programming 1 November 15th 04 09:35 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM


All times are GMT +1. The time now is 02:33 AM.

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"