Active Directory? (reposted in case it was missed after a quiet weekend)

T

Tim

hi [XP Pro, Excel 2002]

i've had a spreadsheet for a while which logs my work. it has a custom
toolbar attached with code to: -
-on opening the workbook, make the bar visible (and turn off standard &
formatting toolbars)
-on deactivating / moving to anotehr workbook, make that bar invisible and
make the standard ones visible again (ie, reverse of above)
-on activation / switching back, make the bar visible (and turn off standard
& formatting toolbars) (ie, same as the first one)

it all worked fine until my pc was 'migrated' to active directory (work
laptop), now none of these events happen. the toolbar is in the list of
available toolbars and when selected, appears & works fine... does anyone
have experience of this sort of thing happening - is it likely to be due to
active directory and is there anyway of fixing it?

also, a coleague, who uses the same files often gets an "Automation Error"
message box when he tries to use any of the macros (it *might* just be
affectnig macros with userforms but i'm not sure)

on a separate note, i have a macro within the same workbook that pulls
together data from the row of the active cell, creates a word document (from
report templates) and hyperlinks the active cell to the word document, this
also works fine BUT upon re-opening the workbook, the hyperlink has changed
"[" to "%5b" and "]" to "%5d" which i presume is some character code for
those symbols, this obviously means the hyperlink no longer finds the
correct file. if i re-run the hyperlink macro, it renames correctly and
everything is fine again until the next time i open the workbook. so my
question is, why is it happening and how can i stop it? it hasn't always
done this, but i think it DID happened prior to active directory (i can't
remember any specific thing which might've triggered it to happen). all
files are on a network drive (don't know if this is significant).

maybe i should look for an active directory ng, but i don't want to cross
post and it is excel that i am having problems with.

many thanks for any help,

tim
 
B

BrianB

Usually leave questions I don't really know answers to a couple of day
because some of us only read unanswered messages, and there might b
one who does know. The lack of response suggests that the workbook ha
become corrupted. Seems a bit of a "minefield". :)

There are so many different questions there that it is a bit confusing
None of them really have full information, despite the long message. Yo
do not mention which version of Excel or what Windows version you ar
using. Were these changed when you changed to laptop? I have read tha
there are sometimes problems when Windows ME is used. There are likel
to be problems if your workbook was set up in a later Windows versio
to the one you are now using.

Don't have a clue what you mean by "Active Directory". As far as I a
concerned it does not matter where a workbook is located, we copy i
from place to place and it should work - unless links to other file
need to be changed too.

There is an implication in you message that the workbook had becom
corrupted before the change. This can happen at any time. You shoul
have made at least one backup copy. Otherwise I think you may need t
face the necessity of completely rebuilding it.

This means making a new workbook and copy/pasting the *contents* o
worksheets to new sheets. If there are numerous sheets you can tr
copying them one at a time, saving the workbook, and checking to see i
it works before copying the next. This might find the one(s) giving th
problem.

Let's look at one question. The problem that your custom toolbar is no
working. Firstly, it should be attached to your workbook vi
Tools/Customize and the workbook saved. The toolbar is then part of th
workbook and needs to be deleted from Excel when the book is closed. Yo
then need code like this, all of which goes into your ThisWorkBook cod
module. Suggest you temporarily comment out the existing code and tr
these basic routines to see what happens.


Code
-------------------

'- hide the bar on changing to another book
Private Sub Workbook_Deactivate()
Application.CommandBars("Test").Visible = False
End Sub
'- show the bar on moving to the workbook
Private Sub Workbook_Activate()
Application.CommandBars("Test").Visible = True
End Sub
'- delete the toolbar on closing file
'- should be attached to the workbook
'- so it is available next time
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Test").Delete
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

Top