Depending on how you want to use, a better method could be
Imports System.IO
Dim fullPath as String = "C:\Users\Profile\MyProfile\List.txt"
Dim drv as String = ""
drv = Path.GetPathRoot(fullPath) 'Returns "C:\"
You can use substring.
Dim fullPath as String = "C:\Users\Profile\MyProfile\List.txt"
Dim drv as String = ""
drv = fullPath.Substring(0,3) 'Returns "C:\"
drv = fullPath.Substring(0,2) 'Returns "C:"
oops. I thought they were talking about VBA for MSOffice and the listbox, not VB6, so I don't know if my suggested events will work or not... Im not familiar with VB6's controls.
When you create a table in Microsoft Word, it is automatically set to not apply any sort of text wrapping to the table.
Have you turned wordwrap on? If not the table's properties will force it to a single line cell
Im not sure if you've figured this out on your own or not (considering the question is a month old), but have you given thought to placing your table adapter in a procedure then when someone performs a search, you pass the required data as arguments then perform your search within the scope of...
We use a third-party app (CDL) that generally runs for 7+ hours while it compiles data. The people who use the CDL have about a 50-ish step program that they have to do manually and simple mistakes can crash the data build. I am writing a little app to automate the steps and to incorporate data...
Not to get into an argument here but how did YOU "put the procedure as a menu item ("Demo Split") under Tools"? YOU did it because you either wrote a snippet of code, or manually added the menu item by using the Tools "customizations" options and assigned it yourself.
Easy enough, I do the...
I am still confused as to why you want to do this every time you start up Word (i.e. using AutoExec)
I have the code in there because as a minimum, I need the following statements to execute so that the "macro" code will at least show up on the TOOLS menu:
Const myProcName =...
Gerry,
Thank you very much for the clarification
Documents.Open Filename:= "fullPATH...\Application Data\Microsoft\Word\STARTUP.SRStags.dot"
I was confusing the ability to call the procedures in SRStags (loaded) with the .dot file being open for the application.
Thanks
Gerry,
Thanks for the information. I can see that I left out some information in my first post. My template is in the ...\Application Data\Microsoft\Word\STARTUP folder in a template called SRStags.dot
This has been my first attempt at creating an add-in, and due to other job constraints I...
Gerry
What exactly is the purpose of the AutoExec?
The purpose of the AutoExec() is to execute any code it contains as soon as the application opens (think of it as an AutoExec.bat file when your computer boots)
The procedure - SRStagMain - is in the add-in, and you are trying to change it...
Insert in a MODULE, then when using the INSERT FUNCTION, you can find it listed under category USER DEFINED.
'-----------------------------------------------------------------------------------------
'-----------------------------------------------------------------------------------------...
I have an add-in template I created for MSWord (basically customized search and replace code). It runs from a dot/dotm template file in the MSWord startup folder. Code works just fine.
My problem is with trying to assign a shortcut key to run the "starting" procedure (SRStagsMain).
Im looking...
Im assuming that JB_Deletesw is a field in your table that your users are using to select the records they want to update, then my question is,
Are you having issues with all the records not deleting, or just one from a group of selected records?
If the answer to the question is yes, then you...
Just a couple of thoughts addressing the inability to delete a record.
In the form's properties:
Is "Allow Deletions" set to YES
and
What kind of value is set for "Recordset Type"?
If your recordsource has a join in it, a DYNASET can allow you to edit some record/fields while restricting...
dhookom is right, you're not using the requery method correctly.
Your code should work, but when the delete is executed, issues a Me.Requery
Me = current form.
This works if your data is being displayed on a form i.e. Default View = Continuous Forms.
If you're displaying results in another...
A couple things come to mind when I think of your problem.
Im assuming that when they scan a barcode, it issues an ASCII 13 or 32 (Enter or Space) which causes the OK button to be selected on the message box.
One way that might work: (this only works if a TAB is not issued)
Set your msgbox up...
I have a code module (Access 2003) that exports all database objects to text files, and have started setting up
code to import these text files into a database.
All my code runs fine and does what its designed to do with one exception. After the code is finished importing the
database objects...
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.