Script Suggestions

  • Thread starter Thread starter James
  • Start date Start date
J

James

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top