VB code "bolSingle" error
I am using D. Kallal worde merge code and am getting the following error for
when pointing to the following line
Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", bolSingle)
the error highlights "bolSingle"
ByRef argument type mismatch
The folowing references are checked
Visual Basic for applications
Microsoft Access 9.0 library
Microsoft DAO 3.6 Object library
Microsoft data access components installed version
Microsoft Visual basic for applications Extensibility 5.3
Dim bolSingle As Boolean
'...Where's the chart code?
Once a chart is created, using the wizard, is there a way
to view all the code for the chart?
Start the macro recorder, then run the chart wizard. Excel will
generate a macro based on the choices you make in the wizard. This code
isn't very efficient, but ti will do as a starting point.
Jon Peltier, Microsoft Excel MVP
Phil Hageman wrote:
> Once a chart is created, using the wizard, is there a way
> to view all the code for the chart?
...Wildcard code for a query
Hello. I have a query that pulls information based on 3 the contents
of three fields in a query. One example of the string I have in the
design view of the query is:
The problem I have is that these fields are not always populated. In
cases they are not ALL populated, the query returns nothing. Is there
a wildcard I can add to the end of this that will disregard the blank
field and only use the 2 other fields for the search if this field is
Try this for the Criteria:
Is Null OR [Forms]![TrainAllqry]![Enrollment Date]
Al...regsvr32 error code 0x80004002 #2
Until December 2007 I could use Visual Studio 2005 to build DLLs using ATL.
Usually Visual Studio 2005 would register the DLLs during building (yeah,
there are still reasons to be an administrator while using Visual Studio).
When it failed, I could type a regsvr32 command into a command prompt.
Starting in December 2007, regsvr32 gives error code 0x80004002,
Interface Not Supported.
(Actual wording: $B%$%s%?!<%U%'!<%9$,%5%]!<%H$5$l$F$$$^$;$s(B)
Visual Studio 2005 gives error message PRJ0050 when trying to build, but the
underlying reason is the same, when Visual Studio 2005 t...Remove a shortcut from desktop using VBA code
I have a program that uses VBA code to creates a shortcut on the desktop. I
want another program to remove that shortcut. Can someone show me how to
remove a shortcut using VBA code. Thank you very much.
Di sFile as String
sFile = "C:\Documents and Settings\<username>\Desktop\myShortcut.lnk"
obviously change the path and shortcut name to suit
"Larry" <email@example.com> wrote in message
>I have a program that uses VBA code to creates a...Error Message Coding
I have a report that has this code in it
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Cost_Center.Value = "30000" Then
text71404501.Visible = False
text71404501.Visible = True
The report is selected to run from a button on a form.
My problem is that if the report has no data, the code returns run-time
error 2427 informing me that an expression has no value. When I debug it goes
to the IF statement above. What code can I add so I'll just get a dialog
informing the user that there is no data and on OK, then canceling the action?
U...bar code/label printer suggestions
Hi, does anyone have any suggestions for a good, high volume bar code
My main concern is stable windows drivers. I just want to be able to install
the printer, go into RMS, choose the correct label size and print (forever,
with no problems :-)
Currently we use the Cognitive Del Sol LX, but we've had various hardware
and especially weird software issues with this printer. When it works it's a
great printer but getting it to work and keeping it working is a pain.
I also just started using a Dymo Labelwriter 330 Turbo. I love this little
thing! It's great, installed with a...Setting control properties via code
I want to turn the visible property of a control button on or off depending
on who's logged in (ie. Administrator, Salesperson etc).
I think I would enter the code to run when that form is opened but I'm
having trouble with how to write the code.
Use the form's Load event to run code similar to this:
Private Sub Form_Load()
' you can use a function to get the user name -- not sure how you're doing
' in your specific situation, so I've just put a "text string"
' ("WhatTheUserNameIs") here for now
Select Case "WhatTheUs...Failed Recent Updates and Error Code 80070490
Since yesterday my computer and me have been trying to install two Vista
Security Updates for Windows Vista (KB967723)
Updates for windows Vista (KB972145)
and I get the Error Found Code 80070490
I have Windows Vista Ultimate.
0x80070490 - ERROR_NOT_FOUND
Corrupted System File; Need to perform an in-place upgrade or reinstall of
How to use the System File Checker tool to troubleshoot missing or corrupted
system files on Windows Vista or on Windows 7
Regarding my previous post on putting a password into m
ActiveSheet.Protect in VBA code, I now need to password protect the VB
code so that you couldn't just load up the worksheet modules and vie
what the unlocking password was. Is there any way to lock off the VB
code so that only I may view / change it?
Thanks for reading. :)
Message posted from http://www.ExcelForum.com
You can Protect your project in the VBA editor
In the menubar Tools>VBA project properties
See the protection tab
This way they can't see or edit your code
Regards Ron de Bruin
(Win XP...Why Won't this code work with different Bitmap Sizes?
Whenever I try to change the bmpWidth, and bmpHeight
very much, it only prints a blank page.
For example bmpWidth = 640, and bmpHeight = 480,
only prints a blank page. Why would this be?
you should contact the author regarding this.
visit me at http://alok.bizhat.com
"i think this will work"
"Peter Olcott" <firstname.lastname@example.org> wrote in message
> Whenever I try to change...pasting excel charts into a ppt template using vba code
I have a process i am trying to automate using VBA. I have a workbook
in excel with numerous worksheets. What I need to do is paste them into
a template powerpoint presentation. There is one blank slide in the
template, so i would also need to write in vba for a new slide to be
created for each worksheet. another tricky thing is that 2 worksheets
correspond to 1 slide. So worksheets with an 'a' extension in the name
go on the left, worksheets with a 'b' extension go on the left. i am a
little new at using vba across application, so any advice would be
I have written a VB program that uses a Vista Icon ( from file called
imageres.dll_I0062_0409.ico ) on a command button.
The icon is the red X close type icon.
When I run the VB program on my PC which runs XP, the icon is nice and
bright red, when the client runs the program on his XP computer, it is all
red speckles - almost like its a poor VGA image.
Resolution on both pc is 1280 x 1024 high 32 bit.
I know im not actually running vista, but all the vista icons i use, on my
xp come up fine.
So i can only assume the client is missing some kind of dll/ocx file to...excel and VB Open Dialog box
I want to add an Open Dialog Box in an excel file, so the user can browse
for a csv file and then add it as a worksheet in the original excel file.
It's going to be like this:
1. The excel file (called main.xls) has 4 Open Dialog Boxes.
2. When the user clicks on the 'Browse' button beside the first dialog box,
he can browse for a csv file.
3. Let's say he chose a csv file named file1.csv... this csv file will be
saved in a worksheet of main.xls.
How do I go about this? Please start with how I can create a Dialog Box.
I want to add an Open Fi...Sheet protection code conflicts with Pivot Table "auto refresh"
I received the following code from Debra Dalgleish, to password protect all
worksheets, setting certain exceptions for objects, etc.
Public Sub ProtectAll()
> Const PWORD As String = "mysecretword"
> Dim wsSheet As Worksheet
> For Each wsSheet In Worksheets
> wsSheet.Protect Password:=PWORD, _
> DrawingObjects:=False, _
> AllowFiltering:=True, _
> Next wsSheet
> End Sub
It works well, except for one thing: when I open the file, I get an error
message which emanates fr...Run VB exe's in Win 7
If I copy a VB Exe from my Desktop with OS XP Pro it fails to run on my
laptop with OS Win 7.
Can I get this to work?
On Mon, 22 Feb 2010 09:25:01 -0800, LondonLad <LondonLad@discussions.microsoft.com> wrote:
� If I copy a VB Exe from my Desktop with OS XP Pro it fails to run on my
� laptop with OS Win 7.
� Can I get this to work?
What is the error? Have you installed all dependent components?
Microsoft MVP (Visual Basic)
> If I copy a VB Exe from my Desktop with OS XP Pro it fails to run on my
>...condense code for gridelines
Is there a way to shorten this code a bit. I recorded this macro and just
feel there is a way to condense it, I'm just not sure how. All I'm trying to
do is add grid lines to my sheet. This macro formats about 2 dozen pages so
the less code the better. Thanks
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
With Selection.Borders(xlEdgeTop...Windows SP1 update error code 80073712
I have 32-bit Windows Vista Home Premium and I've been trying to install
Vista Service Pack 1. Unfortunately, every time I try, It stops halfway
through and returns error code 80073712. I have tried the solution
involving deleting pending.xml, but i didn't have a pending.xml file,
the only xml file in winsxs was called cleanup. I have also tried to
manually install, but also stops halfway and returns error code
80073712. I also tried the "reg delete HKLM\COMPONENT /v StoreDirty"
thing I saw, but didn't have the registry. I'm getting really
I'm using the following code in the BeforeUpdate of the form
to confirm data changes:
Public Function ConfirmDataChange(Cancel As Integer)
Set frm = Screen.ActiveForm
Select Case MsgBox("Record(s) have been added or changed." _
& vbCrLf & "Save the Changes?", vbYesNo, "Record
Case vbYes 'go ahead and save.
Case vbNo 'undo the changes.
Cancel = True
I use the same code in several forms and h...Current User code....where does it go?
I've found the code from Dev Ahsish on getting the current user on
network. Where would this code be pasted? I'm trying to record the
timestamp (have it) and the current user (don't have) of a form in
Access. If I put it in VB how do I call this function up for a
I'm assuming the code you are referring to uses the GetUserName WinAPI
Place the code you found in a module, make sure the function is
public. Now you can refer to that function from lots of places. I
have a function like this that I call NTUserLogin. It is in a module
and looks like this:
...Running Excel macro from Access code
I have an access database which has all my data and queries to feed an
excel file which has links to the access database via ODBC get data.
I then have a macro in Excel which runs all of the updates to the
various ranges of data in the excel file. I would like my code in
access which runs the initial steps needed in the database to launch
excel and the file and then run the macro, save the file as a new name
and close the file. Ideally I would be able to program the file to go
through and run each of the 20 categories by automatically launching
the file running the macro, saving as the new f...VB script using XCOPY
I'm writing a script that copies files from one folder to another, and I'm
wshshell.run "cmd /c XCOPY " & .....
but how do I get the DOS shell window to open when I run this command ??
"Bill" <email@example.com> wrote in message
> I'm writing a script that copies files from one folder to another, and I'm
> using XCOPY.
> wshshell.run "cmd /c XCOPY " & .....
> but how do I get the DOS she...HTTP Status Codes
What are the appropriate HTTP Status Codes for the following:
1. XML is not well-formed (structure problem)....
2. XML is not valid (as per DTD/XSD/XDR).....missing req'd field, etc
I checked out W3C spec and was unable to decide which status codes are best.
Any help is appreciated.
Thanks in advance.
There are not HTTP status codes for this. Status codes are
protocol-specific and are independent of the data that they carry. For
instance, you can include HTTP that is horribly written and does not conform
to any semblance of a specification, yet a web server will still deliver...VB Macro: How to create a loop to change a number in cell
I hope this is an easy one ...
I have three cells and a macro application.
A1 is the starting number i.e. 2
A2 is the ending number i.e. 10
Macro application imports data based on A3
I want the macro to change the cell in A3 to 2, run macro
to import, change cell in A3 to 3, run macro to import,
4 ... 10. So I want to be able to type in any numbers in
A1 and A2 to tell the macro what to import.
Any help would be appreciated!
dim ictr as long
for ictr = .range("a1").value to .range("a2").value
.range("a3").value = ...update rejected with error codes -643 and 664 (only Office PRO 20
all the other updates (XP, IE etc.) have been successful.
Requested System Data:
OP System: Windows XP Home Ed.
Version: 5.1.2600 Service Pack 3, v.5857 Build 2600
Update: Windows Update (manual)
Last successful: today
Not updated: with error code -643: all Office 2003, Outlook, Word, Excel
with error code -664: KB975051 (Office 2003)
Anti-Virus: Avira Antivir Personal Free Antivirus 184.108.40.2068
Update level 21.12.09