How to proceed

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

The below macro works. The only problem is it does only ½ the job. It
currently only works with sheet name "shtVarD". Depending on the user input
another sheet "shtFixD" could be used. The starting point would be different
- but the otherwise the logic is exactly the same...

One solution is to have another "sub" that would do only shtFixD

Another solution would be to "string" items together

A final solution would be create another variable and assign it either
shtFixD or shtVarD.

Or is there a better way?

Any suggestions would greatly be appreciated....
 
my suggestion - put your main macro all together under one sub

Sub Main()
.......
End Sub

then have your starting sub:

Sub Start()

if sht.name = shtFixD then
'variable to start wherever
Call Main
end if

if sht.name = shtVarD then
'variable to start wherever
Call Main
end if

End Sub


you get the idea, i imagine. might need some individual tweaking.
hope it helps - somebody else may have a different idea.
:)
susan
 

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