VB Macro to VB Application
I have a VB macro. I want to move it to a VB application, using my VS 2008.
I don't know how to get the Application to run against an Excel Worksheet.
Can someone help?
"JCO" <email@example.com> wrote in message
>I have a VB macro. I want to move it to a VB application, using my VS
If you mean a VBA macro then moving it to VB is usually pretty easy but VS
2008 is not VB, it is VB.Net, and that's a very different language. This
group is for VB 6 and earlier versions and doesn...VB
I've modified some windows with VBA to perform database queries and
return the results in a field in those windows. In one particular
window, the SalesTransactionEntry window, I create the
ADODB.Connection, ADODB.Recordset, and the ADODB.Command. The problem
is, I want to manipulate them in the SalesTransactionEntryDetail
(Grid). So I made the Recordset and Command, rst and cd respectively,
public. My question is pertains to the scope of the public variables.
Where else are they visible? If I create a public variable called cn
in this window and in another totally unrelated window, am...Excel Vb to move a file to a shared network drive????
Hello, I have a simple excel vb file, and i am trying to have the file
moved, ** or ** copy/pasted to a network shared drive.
we have a network shared drive, called "WDdrop". any CSV, PAS, file
copied and pasted into this folder, will print a label to a designated
at the present, i have to use 'command buttons' to run the vb script
file, then copy the file to the WDdrop...
Here is an example of my VB file..... to make it easier to see the
lines of concern, I will tab them out some so they stick out!!!
' MACRO Macro
' Macro recor...color change
Env: WindowsXP, VC++6.00
By using SetROP2(R2_NOT), I draw a line on a bitmap. If the color of a pixel
is not RGB(128,128,128), the line can be seen at this pixel. I hope the line
can be seen even on RGB(128,128,128).
I happen to get an application which can draw a line on any colors including
RGB(128,128,128). And I notice that the conversion of color it uses are as
(0,255,255)=>(128,...Runtime Error with Excel VB Sub
I set up a 4-sheet Excel workbook and I have a VB subroutine that
manipulates ranges across all the pages. The subroutine works ok if
called from sheets 2, 3, or 4 but not from sheet 1.
I set up a button on sheet1 that has this action:
TestLog.xls - Sheet1
Private Sub CommandButton1_Click()
CalcUnique is my subroutine that begins this way:
TestLog.xls - ThisWorkbook
Dim Band As Integer
' other Dims deleted
[UCalls3].ClearContents 'Clear Unique list for all bands
When called from th...Windows File Explorers could allow fonts face and color changes.
Sorry, this is not a Word question, but I could not find "Windows File
When I open a file explorer and see the list of folders and files, I often
wish I could change the file and folder names fonts to be bold or to have
This would allow a visual sorting without using a folder, and would make it
easier for example to say "open the file with the green name".
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agr...VB client calls VC OCX with named args
I have got a VC++ 6 OCX and lots of Visual Basic 6 clients using it.
Originally, the OCX was written in VB, too. Thus, the clients could (and do)
use named arguments in calls to the OCX like func(12, Arg2:=44) - or however
this is precisely in VB...
Now that the OCX is written in C++, VB complains that the OCX does not
support named arguments.
Is there a way to define in the ODL defs that this works? Or is it
...Numbered list- want to color just one word with color, not number
Using Word 2003. I have number lists with a word like:
When I color the word, the number is colored along with this. I can select
undo and correct it but that is a pain.
Is there some setting that will allow me to just pick the word, change its
color, and not have the preceding number pick up the color?
Thanks for any assistance with this item!
I had the same issue once. I think you just have to be very careful of
highlighting the text with your mouse because if you go over (for instance)
the first letter word will think t...VB Front Access Back
If you have a VB Front End and an Access Back End do you still have to
have Access installed?
...colors in bar graphs
I would like to automatically change the color of a bar depending on the
entered value versus a targeted number. For example: The target value is
50, if the entered value is 40 (below target) the bar on the graph shows up
red. If the entered number is 60 (above target) the bar on the graph shows
up green. This way I can see if each data point is above or below target
You can either create conditional charts, see Jon's page for further
Or use VBA code, which can be placed in one of the w...How do I retain a colored font in the calendar wizard in Pub2000 .
I am using the calendar wizard in Pub. 2000 and want to color some of the
font to indicate different events. When I change from one page to another,
the colored font is lost.
I have searched the Help menu and on Microsoft's publisher kinowledge based
articles and tried everything they have suggested. (article Q240773) Can
anyone help me remedy this problem?
...Fill color by date
I'm working with Exel 2007. I made a simple spreadsheet with several due
dates of a particular project. The spreadsheet shows when a person first came
onto the company, and I need to track when their evaluations are due. The
first is due 30 days after, 10 months after and a year after the initial hire
date. I'd like to be able to turn the cell yellow two weeks before the review
date, and red on or after the due date. I'm somewhat familiar with Excel, but
it's been several years since I've had to write formulas. Thank you for your
You'd use Conditional For...how to convert string to double datatype using VB.net
i want a convert a string to double datatype
EggHeadCafe - Software Developer Portal of Choice
kadar ali schrieb:
> i want a convert a string to double datatype
Good question - because it shows that you switch Option Strict On (as recommended).
"kadar ali" wrote:
> i want a convert a string to...VB and graphs
I have a scatter graph with 5 different series., I want to add check boxes
to select which of the five series a user want to see in the graph.
To explain better, I want the user to choose the 5 or any o the series
he/she wants to see plotted on the graph.
Is that possible? What code should I use?
X Y scatter chart
Select visible series
...Link to the VB
Months ago, I asked about hiding/unhiding multiple sheets
using VB. A link was posted where I could download the
free VB by one of the MVPs. I lost the link. Can anyone
please post the link again here.
Hi .... McNiwram,
This is something that you can find the answer for yourself
and you are probably the only one who would recognize
what you are looking for.
Generally one would put their email address into a Google
Groups Search, but can use the email address or the name
with the email address, since your name is unique you could
use McNiwram in the author field. However, ...VB Code for Naming Ranges
Can somehere tell me how to name a range in excel using VB code. Here'
how I get the range:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
Application.CutCopyMode = False
As u can see the range changes, but I would like to create the sam
name for whatever the range is?
Message posted from http://www.ExcelForum.com
the code you can use is
ActiveWorkbook.Names.Add Name:="YO...How can I change a cell value based on another cells color?
I have many different values on a large spreadsheet. I am wondering if there
is a way to change a cell value to match another cell value based on the
second cells color? For example, I would need to change cell A1 to a value of
10 so it matches cell A2's value of 10, because cell A2 is highlighted in
green. I am not familiar with macros, is this something that would require a
There's no built-in feature that will change a cell's value based on the
colour of another cell. You would need to use code to accomplish this.
Chip Pearson has information on using colours in ...Use the " character within a SQL statement embedded in vb code
Hi to all,
Could someone please help me to use the " character within a SELECT
statement embedded in vb code? The vb code supplies the RowSource Property of
thanks in advance, George
Put two double quotes in a row.
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
"George" <George@discussions.microsoft.com> wrote in message
> Hi to all,
> Could someone please help me to use the " character within a SELECT
> statement embedded in vb code? The vb...vb help, convert from formula to vb code..
I am trying to get this formula to work.. and Im not sure where to go from
here. Could someone please help? Thanks in advance, this community has been
Im trying to convert this excel formula to a vb formula:
I need it to count how many times it finds "CXL" in the H column when the B
column matches up with the user input.
Dim nStuff As String
Dim ThisSheet As String
Dim j As Long
ThisSheet = ActiveSheet.Name
nStuff = InputBox _
...VB++ Exe zum Ansprechen einer VB ActiveX DLL
Ich ben�tige eine EXE, welche in einer DOS-Box mit Parametern
aufgerufen wird und das Ergebnis auch wieder in dieser DOS-Box
Mit VB ist dies leider nicht zu machen. Nun weiss ich zwar das dies
mit einer VC++ Exe geht, bin aber leider C Neuling.
Kann mir dazu jemand ein Beispiel posten ? Die C++ Exe soll einen auf
der Commandozeile �bergebenen String (das sind die ganzen Parameter)
an eine Funktion einer VB ActiveX DLL �bergeben. Das Ergebnis soll
dann von der ActiveX DLL an die C++ Exe zur�ckgegeben werden und in
der selben DOS-Box angezeigt werden.
Hoffe es k...Calculating the brightness, hue and saturation of a color
How does one calculate the neat values shown in paint when selecting a
color: Hue, Sat and Lum?
One of them is:
((Red + Green + Blue) / 3) / 0xFF * 100
- Mark Randall
"Uranium-235" <Uranium235@discussions.microsoft.com> wrote in message
> How does one calculate the neat values shown in paint when selecting a
> color: Hue, Sat and Lum?
> Thank you,
Well, truthfully I was only interested in luminescence and it seems...Color palette is all messed up
My color palette all of a sudden is messed up, like
bright red appears under green and bright blue appears
under black. Repairing Office didn't help, any
Go to the Tools menu, choose Options, then the Color tab. There,
click the Reset button.
Microsoft MVP - Excel
Pearson Software Consulting, LLC
"David" <firstname.lastname@example.org> wrote in message
> My color palette all of a sudden is messed up, like
> bright red appears under green and...How to modify a CToolBar's text color
In my app, I created a toolbar.
I do not want to modify any other thing but the text color.
Any one can tell me how to do it?
Thanks a lot.
I can only think of doing it using NM_CUSTOMDRAW.
Thanks. But there are too much to do for custom draw. I only want to modify
the text color.
"Ajay Kalra" <email@example.com> ????
> I can only think of doing it using NM_CUSTOMDRAW.
> Ajay Kalra
There is...Format Color for worksheet
Is there a simple way so that when I open a Excel sheet I have the first 3
rows a dark gray color, the next 3 rows a light gray, the next 3 back to dark
and so on, or do I have to use the "format cells"??
"NotGood@All" <NotGoodAll@discussions.microsoft.com> wrote in message
> Is there a simple way so that when I open a Excel sheet I have the first 3
> rows a dark gray color...VB code
I am using Office 2007. In Excel, I like to write a code in Visual Basic to
copy the contents of the cell above into a blank cell down below and repeat
the procedure until it reaches the bottom of the data. All the cells are not
blank cells. Only a few of them are blank cells.
Example of the column
I like to copy 01/01/2008 into the empty cell down below. Then move to the
next blank cell and copy 02/01/2008 into the empty one. Repeat the procedure