(vba) edit module n macro in different access db
I want to perform editing module(s) and macro(s) from different access database(s).
no progress in editing ( find/replace text ) macro,
well this is my code for replacing word in module ( please see attachment )
its only works when in the same database,
but as soon as I add 'Set Dbs = OpenDatabase(dbname) it didnt work
Thank you for taking the time to report an issue.
What's wrong... Please write below.
DoCmd.ShowToolbar "Ribbon", acToolbarNo
However, using the macro builder I use the "ShowToolbar" action but it doesn't recognise the "Ribbon" toolbar name. Is there a different name I should be using here or can I create an AutoExec VBA module?
Edit: Think I might have sorted this actually - I created a function with the above code in a VBA module and just created an AutoExec Macro which calls the function. Is that the best way to do what I'm trying to do?
So I've made a macro > sendobject and argument is> Module, 0-2 Days, Excel97-Excel2003Workbook(*.xls), [LINK], , , days, test, No,
the 0-2 days is the file name and the email is made up for confidential reasons!
However when I then run this from a macro I constantly get a message box saying that
"the expression you entered has a function name that the [database] cannot find"
In the macro I have used Run Code with ChangeDataType() as the function name. The module is called
I'm stumped as I have tried every permutation of naming for the function I can think of, but still it sends an error every time.
But when I edit VBA (first keystroke) Access VBA plugin freezes and crashes.
Problem is on all databases using VBA
If I log on as a other user, problem isn't there.
I use Win7 64bit, Access 2010 32bit
I use .mdb format only
I've tried access.exe mydatabase.mdb /decompile
I would log on as other user, rename c:\users\myprofile and thus force it to create a new profile for me. But Windows 7 just creates a temporary profile as it can't find the old one.
I would prefer not to delete my profile through control panel, as I would like to be able to undo the change
EDIT: Actually, this might not be an VBA issue - I found out that I have no problems editing VBA code that has no forms (GUI), so the problem just might be regarding Forms and not VBA
While working with Access and VBA There are many VBA codes which we use very frequently for example:
Private Sub close_Click()
How to save this as Module and then call to a button
similarly in access I wonder how to run vba codes. there is one option called vba in database menu in (access 2007). I clicked that and inserted modules and saved. Now I don't know how to run it in a table or query.