ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Script Suggestions (https://www.excelbanter.com/excel-discussion-misc-queries/167387-script-suggestions.html)

James[_4_]

Script Suggestions
 
Hi All,

I pasted script below and I need a bit of help with it. It works
fine, but I want to refine it. I have this in seven different
worksheets (for each day of the week). However, I usally have to edit
the part where it says "MONDAY RECEIVING.xls'!
Sheet1.hide_unhide_rows", to what the file is named (TUESDAY -
SUNDAY). Is there any script I can use for it to update no matter
what the file name is? Instead of me having to manually do it for
each worksheet.


Sub CNVTSRT()
'
' CNVTSRT Macro
' Macro recorded 5/16/2007 by
'
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("J1").Select
Selection.Copy
Range("G2:G5000").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Sheets("SUMMARY").Select
Application.Run "'MONDAY RECEIVING.xls'!Sheet1.hide_unhide_rows"
ActiveWindow.Zoom = 40
End Sub

Don Guillett

Script Suggestions
 
Sub CNVTSRT()
myday=inputbox("Enter day ie: Monday")

Range("J1").Copy
Range("G2:G5000").PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply
Sheets("SUMMARY").select 'selection may not be needed??
Application.Run "'" & myday & " RECEIVING.xls'!Sheet1.hide_unhide_rows"
ActiveWindow.Zoom = 40
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"James" wrote in message
...
Hi All,

I pasted script below and I need a bit of help with it. It works
fine, but I want to refine it. I have this in seven different
worksheets (for each day of the week). However, I usally have to edit
the part where it says "MONDAY RECEIVING.xls'!
Sheet1.hide_unhide_rows", to what the file is named (TUESDAY -
SUNDAY). Is there any script I can use for it to update no matter
what the file name is? Instead of me having to manually do it for
each worksheet.


Sub CNVTSRT()
'
' CNVTSRT Macro
' Macro recorded 5/16/2007 by
'
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("J1").Select
Selection.Copy
Range("G2:G5000").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Sheets("SUMMARY").Select
Application.Run "'MONDAY RECEIVING.xls'!Sheet1.hide_unhide_rows"
ActiveWindow.Zoom = 40
End Sub




All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com