Minggu, 20 November 2011

[ExcelVBA] Re: Opening a workbook automatically always to the same Sheet (and Range)

 


Thank you for your comprehensive answer. With the right keyword, I was
finallly able to get the opinion of the Help file on the matter: it does
not mention anything like a /x macroname option for executing a macro.
With that established, I didn't feel like researching off-beat parsing
and just pointed my Auto_Open() to the first of two Excel graphs I want
to link to optionally by button click in a PowerPoint slide show. And I
added a pushbutton next to each of the graphs to get quickly to the
other graph, with the Application.Goto() method set to Scroll:=True.

The only problem left is that the light grey buttons are hardly
distinguishable from the background, but I cannot get a red pushbutton
now, although I clearly remember I could get one, on my present system,
after a lot of research a few months ago, the details of which, possibly
involving VBA from the Immediate Window, I forgot. I find that the
pushbuttons for a form and the pushbuttons for a spreadsheet don't have
quite the same property sheet and the same capabilities, and my VBA
Editor doesn't see the desired properties where I want them. Besides,
the highly loaded spreadsheet on which I want to do this doesn't produce
pushbuttons that can have BackColor set to Highlight (=blue). So, for
the time being, the Excel buttons linked to from my slide show remain
faint, although I can get the caption in large bold at least.

Best regards,

Roger Belling

--- In ExcelVBA@yahoogroups.com, <david.smart@...> wrote:
>
> I'm not aware that Excel has a /x option. Do you have any URL links to
> a description of it.
>
> There are numerous web pages about retrieving the command line
arguments
> from a shortcut into the autorun macro. These could be parsed and used
> to run a selected VBA sub.
>
>
> Regards, Dave S
>
>
>
> ________________________________
>
> From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On
> Behalf Of Roger Belling
> Sent: Friday, 18 November 2011 04:58
> To: ExcelVBA@yahoogroups.com
> Subject: [ExcelVBA] Opening a workbook automatically always to the
same
> Sheet (and Range)
>
>
>
>
> Can anyone suggest a way to make the /x MacroName parameter work in a
> (Windows Vista Business 2006) shortcut (and preferably for different
> macros from different shortcuts)? It worked for me sometimes, but the
> more I tried to use the feature, the less it worked reliably and with
> full flexibility. (One can theoretically get the same workbook opened
> to different sheets by different shortcuts specifying different macro
> names. I have had the equivalent working in Access for years.)
> I do get reliable operation if I use Auto_Open as a macro name,
without
> having to specify it in a shortcut, but it can open the workbook only
to
> one sheet and not to different ones on different occasions. (I use a
> modulo 2 counter on a sheet now that alternates which of 2 sheets it
> will open to.)
> Thanks if you can help.
> Roger Belling
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> ----------
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mails are not encrypted and cannot be guaranteed to be secure or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail
transmission.
> If verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities
> or related financial instruments.
>
>
> UBS reserves the right to retain all messages. Messages are protected
> and accessed only in legally justified cases.
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar