Topics Search

(vba) edit module n macro in different access db

(vba) edit module n macro in different access db
Views: 40
im stuck in vba for last 2 days.
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
Sponsored Links:

Similar posts...

 

AutoExec Macro in Access 2010

AutoExec Macro in Access 2010 Icon
I've created an AutoExec macro in Access 2010. I want it to hide the ribbon bar on open.

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?
 

Running a VBA Module from a Macro

Running a VBA Module from a Macro Icon
How do you run a VBA module from a macro? I tried the OpenModule action, but all it did was to open the module. I had thought this would run it since OpenQuery runs the query, not just opens it.
 

Renaming external file from within a macro

Renaming external file from within a macro Icon
I only need to rename a txt file created by a dos procedure invoked by an Access macro through the same macro. What happens is that the txt file just created seems to be held by the macro, because if I try to rename it through a VBA module inside Access database by runnig it after the creation during the macro, nothing happens, conversely if I let the macro finish and execute the VBA renaming module inside a new macro, it works fine. Maybe I need to create an external exe vba file to rename the txt file to be invoked by the main macro?
 

Creating a macro to send a module!

Creating a macro to send a module! Icon
I want to create a macro to send a module, the module however must output in an excel xls version, to top it off the output must be split into different tabs of which I have already created in vba!

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!
 

Module Error in Macro

Module Error in Macro Icon
I have created a module as below, which when I use Run in the VBA window does exactly what I want it to.
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.
 

Access crashes when editing VBA

Access crashes when editing VBA Icon
I can start Access and VBA module without problems.
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
 

VBA Code To Global VBA

VBA Code To Global VBA Icon
s I have a question about saving VBA As Global Module.

While working with Access and VBA There are many VBA codes which we use very frequently for example:
Private Sub close_Click()
DoCmd.Close
End Sub

How to save this as Module and then call to a button
 

how to use or run access vba code in access 2007?

how to use or run access vba code in access 2007? Icon
We press alt+f11 then insert >> module. To run that, view >> macro >> runmacro >> refreshpt something.

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.
 

Jump Start VBA Skills with MS Access Macros

Jump Start VBA Skills with MS Access Macros Icon
Macros help to speed up the performance of certain repetitive tasks when using an application. They are used extensively in all office-related software. As a programmer, you can leverage the built-in macro object in MS Access to get a head start in understanding VBA. This article explains how. TOC: Jump Start VBA Skills with MS Access Macros; Creating and running a macro in MS Access: opening the macro designer; Creating the first macro; Converting this macro to VBA code; Creating the second macro.
 

Open / edit excel macro in vba

Open / edit  excel macro in vba Icon
im trying to Open excel macro in vba to perform find and replace function in access.
 
Sponsored Links: