Hello Gerry and others,
many thanks for your feedback - I need some time to try and make an ini file work, though the rest of this week is taken up by other things.
Thanks for your help and feedback and I'll let you know once I've found a workable solution.
Gerry you are right that my...
Hello Gerry,
I've posted it on another forum already - but in any case it is written in Word using VBA.
If you could help me with some simple example, I would be much obliged.
Alex
Many thanks for below code - that answered the first part of the question. Second about the *.ini file remaining!
Is there anyone that can supply the code to call for data from an *.ini file?
Regards,
Alex
Public Function ACF()
ACF = "Test 1"
End Function
Sub AA01()
MsgBox ACF
End Sub...
Can someone give me an example of the code that will make this work?
Below doesn't return the value!
Public Function ACF()
MB1 = "Test 1"
MB2 = "Test 2"
End Function
Alex
Hello Harry,
can you give me a sample code how to do this - I've given you the complete sample code as I wanted to do this, but this didn't work - can you re-write this so it will work.
Thanks,
Alex
I'll do that - thanks and let you know if it works.
But do you know any 'simple' solution by writing it first of all as a global variable at the top of my procedure?
For example:
> Function ACF(MsgBox) As Boolean
'This doesn't work yet
MB1 = "Test 1" 'This line I want to get from a global...
Hello Harry,
I would like either the code (statement) to call for data in the C:\msgbox.ini file.
For example:
Sub AA01()
Call from C:\msgbox.ini MB1
MsgBox MB1
End Sub
This would then open a message box with the text defined in the msgbox.ini file:
[MsgBox]
MB1 = "Test 1"
Alex
Hello,
I think I posted this question in the wrong forum earlier - appologies.
But I would like to define text and values 'globally' so that they can be used throughout all modules.
Below is an example of what I want.
Preference would be to define MB1 and MB2 in an outside msgbox.ini file...
Hello,
I would like to define text and values 'globally' so that they can be used throughout all modules.
Below is an example of what I want.
Preference would be to define MB1 and MB2 in an outside msgbox.ini file (C:\msgbox.ini) and let the module call for that
'[MsgBox]
'MB1 = "Test 1"
'MB2 =...
Hello Bob,
many thanks for adding your wisdom to this issue.
After the weekend I will give it a try, though the last line about the loop is for me clouded in mystery.
Let me give it a try and I'll thank you after for this valuable post.
Alex
Hello Bong (Bob Rashkin),
re-reading your post, you seem to offer a way to directly import from an macro.ini file a value - do I understand that correctly?
Could you give me an example of the first two lines in an ini file?
Few things I didn't understand though:
1. parmarr = a.split("=") -...
Thanks Tony,
I'm going to give the ini file a good try and will add the code to translate the values accordingly at each category.
I'll give you some feedback in due time.
The toolbar is a seperate story I can see. I will have to look into that after the weekend.
But thanks once more for your...
Hello Tony,
thanks for the info and code - starting to look like I'm getting there.
I have a question though:
Below I have my ini file:
Macro.ini file
[Category01]
BackgroundColor=wdColorRed
FontColor=wdColorLightBlue
Category=PRINCIPLE
Shortcut=Alt P
[Category02]
BackgroundColor=wdColorTan...
Hello Bob & Tony,
thanks once more for advice, though it is a little beyond me as is.
The below code text should be in the ini text file or ...?
fname = <your file name>
dim parmcll as new collection
Open fname For Input As #1
Line Input #1, a;'now "a" is a variable containing the...
Hello Mintjulep and Bong,
thanks for your answers.
It's true that I've duplicated whole chunks of code to achieve what I wanted to achieve so far - minus the flexibility.
An ini file would really be great, though it probably wouldn't change the reference in my personal toolbar to 1 of the 20...
Hello Bob,
in actual fact I have about 20 colors and categories - I just gave one sample.
Is there a way to call up a msg box to set this parameter? In other words to have a macro that changes the color / category?
Regards,
Alex
I want to distribute a template (*.dot file) to enable people to automate certain tasks of marking selected text and copying that to an overview in the document.
I have written certain code to color and add a symbol to selected text, then automatically placing this selected text in a section of...
I want to distribute a template (*.dot file) to enable people to automate certain tasks of marking selected text and extracting that to an overview in the document.
I have written certain code to color and add a symbol to selected text, then automatically placing this selected text in a section...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.