Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

VBA Excel: Code For Msgbox Pop Up Window

does anyone can help me with the code to do that:
I need to associate a pop up window to a certatin value.i.e in excel when a cell's value is higher than another cell's value a pop up window with a warning should come up. I know how to use formulas to give me this warning but a pop up window would be much better...

thanks a lot for any feedback

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Activate Window After MsgBox
Hey everyone: (newbie here)

I am trying to create a small automated testing utility...

My app currently invokes another application (Terminal Emulator) and sends interactive events to it. I am invoking a Yes/No MsgBox (continue or stop) when an error occurs in the set of events.

The issue I'm having is that when I say Yes or Continue, I'm not able to truely activate the TE window again. After the user clicks on the continue button, I am using the "SetForegroundWindow" to bring the TE to the surface again, but how to I truely "activate" the window so I can continue with the rest of the events?

On a side note...I tried using setactivewindow(hWnd), but it's returning false

Thanks in advance for your help!

How To Keep A Msgbox On Top Of A New Outlook Message Window?
What I'm trying to do is to use the '.Display' keyword to bring up the email in Outlook and then have a message box ask the user if the Email is correct. If they reply 'Yes' it would send it out otherwise it would exit the function. I don't want them to use the 'Send' button in Outlook. I want the VB script to use the '.Send' keyword. The problem is the msgbox is hidden by the email. I thought by using vbSystemModal on the msgbox would resolve the problem, but the msgbox is still hidden. I'd like to know how to keep the msgbox on top of the Outlook window. I can use the '.Close' keyword to close the window. Any ideas??

'My Code

Public Function SendEMail(EMailAddress As String, _
Optional EMailCCAddress As String = "", Optional EMailSubject As String = "", _
Optional EMailMessage As String = "", Optional EMailFile As String = "", _
Optional EMailAttachmentName As String = "", _
Optional blnUrgent As Boolean = False) As Boolean

Dim reply As String

Dim oMSOutlook As Outlook.Application
Dim oNameSpace As Outlook.NameSpace
Dim oOutlookMail As Outlook.MailItem

On Error GoTo SendEmailErrorHandler

Set oMSOutlook = New Outlook.Application
Set oNameSpace = oMSOutlook.GetNamespace("MAPI")
Set oOutlookMail = oMSOutlook.CreateItem(olMailItem)
With oOutlookMail
.To = EMailAddress
.CC = EMailCCAddress
.HTMLBody = EMailMessage
.Subject = EMailSubject
If EMailFile <> "" Then
.Attachments.Add EMailFile, olByValue, 1, EMailAttachmentName
End If
If blnUrgent Then
.Importance = olImportanceHigh
End If


reply = MsgBox("Does the Email look correct??", vbYesNo) + vbSystemModal
If reply = vbYes Then
End If

End With
Set oOutlookMail = Nothing
Set oNameSpace = Nothing
Set oMSOutlook = Nothing
SendEMail = True
Exit Function

MsgBox "Error sending EMail" & vbCrLf & "Error number: " & Str( _
Err.Number) & vbCrLf & Err.Description, vbOKOnly, "MSR"
End Function

Private Sub Command1_Click()
Call SendEMail("Doe, joe", , "Status Report", FormatHTML)
End Sub

Changing Font In Msgbox Window
Hi all,

Could someone kindly tell me how to change the font / font size in the msgbox popup window? Thanx in advance.

Changing The Window Text Of A Msgbox
How do i change the window text of a msgbox????
its displaying the naem of my project or something at the moment

How Do You Make Multiple Line In A MsgBox Window
Hi Everyone,

I am trying to figure out how to make multiple lines to be displayed in a MsgBox window. The information to be displayed makes for a long window and I would like to shorten it. Kind of like what wordwrap does.



A Msgbox Or Window Hints The Programming Still Running
my program needs to take more than 2 min to perform the computation. I would like to remind the user that the program is still running. However, this reminding window or msgbox does not show up until the program finishes running. I guess that it did show up but did not refresh. Can anyone help me to write a correct reminding window or msgbox?
Thanks a lot.

How To Use Msgbox To Make A 'Are You Sure You Want To Quit?" Window
How do I use the MsgBox function to create a dialog box that asks "Are you sure you want to quit?" with a 'Yes' and 'No' option.

If the user hits 'Yes' then the form basically runs
VB Code:
Unload Me
otherwise if user hits 'No' then the dialog box goes away and nothing else happens (goes back to the form.)

Can I Use My Own Button Text For MsgBox PopUp Window?
I use the MsgBox function a lot since it is real handy to ask the user Yes/No/Ok questions, however, in a couple of cases it would be nice to change the text on the buttons to be something other "Yes", "No" and "Ok". Is there a way to do this, or must I create a separate Form to have this type of popup window be displayed?

Urgent : Passing The Message Of Dos Prompt Window To A File Or A Vb Msgbox
hello Sir ,
i have a VB apllication which runs the shell command
shell "c:filecmp.exe... "
this command compares the two files and tells whether they r same or not .
if files are same then dos prompt window gives " verified"
if files r not same then it gives "not verified"

now I want that this message should be passed to a msgbox
or to a file .
Can anybody help me in this ?
waiting for reply

Window XP Error 's Window Pop Out While Opening Excel File
I had created a button to open an excel sheet with the following code (also added the excel references):

Private Sub Command1_Click()
Dim AppExcel As Object
Dim AppWorksheet As Object
Dim AppWorkbook As Object

Set AppExcel = CreateObject("Excel.Application")
Set AppWorkbook = AppExcel.Workbooks.Open("C:ook1.xls")

AppWorkbook.Application.Visible = True

End Sub

I then make the program into EXE and run it on my PC (windowXP with microsoftXP offices) with no problem. The excel file opened.

Later I copy the EXE file into my office's PC (windowXP with microsoft office 2003) and run it, EXE file ran. But when I click on the button to open excel file, the window xp error reporting window pop out then the EXE file was closed. I checked the Windows Task Manager and found that the excel software was loaded but not visible.

Wondering what's wrong?

Msgbox Code
hello guys

i want the code for a message box to tell me are you sure you want to exit and to have YES or NO buttons only and when i tell yes to exit the program and when i press no to stay where it is...


MsgBox Code
umm i cant get mine i get syntax errors does any one know ? i use this

[highlight]Dim answer
answer=MsgBox("Hello everyone!",65,"Example")

Msgbox Code
Well im making a game and have a msgbox that appears when a button is pressed. Im using a vbokonly msgbox and want to put code into the ok button. Currently the player presses ok then nothing happens. I need the ok button to make the current from invisible and the main menu visible or enabled whatever i should do.

Msgbox Code? 'Day 7, Omg
How do you use a freakin msgbox, i know the code just to have plain text.

VB Code:
msgbox "This is confusing confuscious"

Then the book goes:

"The following is the format of the msgbox () function:

VB Code:
intResonse = MsgBox(strPromt[, intStyle][, strTitle]) 'what is that mean???  

Ok, though there is an example:

VB Code:
intResponse = MsgBox("Is the printer on?" vbYesNoCancle + vbQuestion + vbDefultButton2, "Question Box")'what does that all mean? Plus the Yes & no & cancle do the same thing if clicked...  

Help me out will ya
~$uper-Stumped & about 2 throw this book out my 7 storey window.

Need Help With Msgbox Vbyesno Code
Hi everyone.Got a bit of an issue with a bit of code and its driving me around the bend. Wondering
if someone could have a look and let me know what I might be doing wrong.

Write_SIF_File SIF_Full_Path is referring to some code I have that creates the file and
adds all the data. I suppose you could imagine this as creating a text file if it helps.

Hope someone has an idea. Thanks

Private Sub cmdWrite_Click()
Dim fso
If fso.filexists(Drive1.Drive & "winnt.sif") = False Then

Write_SIF_File SIF_Full_Path
End If

Dim Msg, Style, Title, Response 'dim the variables
Msg = "Overwrite existing file?"
Style = vbYesNo + vbCritical
Title = "Overwrite Existing?"
Response = MsgBox(Msg, Style, Title)

If fso.filexists("" & "winnt.sif") = True Then
If Response = vbYes Then ' User chose Yes.
Write_SIF_File SIF_Full_Path ' Writes the file
If Response = vbNo Then
Exit Sub

Trying To Improve My MsgBox Code.
Hi there,

I have this little bit of code below which I use quiet frequently, but got a little tyred off looking at, and now seeking some change !!!
I would like to get away from these MsgBoxes as much as, and would like to use something else IF THERE IS, but not nessasarly a Label. This
something should be able to fill in the code as in my MsgBox ???
VB Code:
(" & Rs_Client.Fields("name")
I could maybe use some Command Buttons for the
VB Code:
vbQuestion + vbYesNo
and maybe a Label here to show the
VB Code:

I'm working alot at the moment with the RichTextBox to show messages, and this works very well, but I can't fill in or better say I would not how to.

Anyway maybe some of you have an idea to share would be very much appriciated.

Thanks aktell

VB Code:
Dim X As Integer            X = MsgBox("Are you sure that you want to DELETE the Client: (" & Rs_Client.Fields("name") & ") from the database?", _           vbQuestion + vbYesNo, "Delete a Contact!")    If X = vbYes Then        Rs_Client.Delete        MsgBox "Record has been deleted!", vbOKOnly + vbInformation, "Delete Successfull!"        Rs_Client.Requery        Call Client_AddNodes    End If

How Can I Close A Msgbox With Code?
I want something that would function like this.


Msgbox ("Searching database..... Please hold.") vbinformation, "Searching"

"select * from mytable where something = somethingelse"


I know that you can't do the Msgbox.hide when the query gets done. How could I do this?


Msgbox Code Problem
Hi ,
I have a small issue.

Private Sub add record_Click()
On Error GoTo Err_Add record_Click
Dim CMN As Integer

If CMN = Null Then


DoCmd.GoToRecord , , acNewRec
End if
MsgBox Err.Description
Resume Exit_Command292_Click
Exit Sub

in a databaseb I have 4 txtboxes (CMN ,CFS ,DMN ,DFS)
so when I want to add a new record I want to make sure the I don't forget to do the selection (between those 4 ). If any one of these is selected all the others will have a (0 )or (1) so I only need to do a msgbox erorr for one of them.

I tried lots of things didn't work, I don't now if I'm using the NULL correctly.

any sugestion.

Inserting Code For A Msgbox...
I'm still working with this code...The code checks for existing folders, and doesn't create them if they exist, and creates them if they don't exist.

Code:Public Function MkDirs(ByVal PathIn As String) As Boolean
Dim nPos As Long
MkDirs = True 'assume success
If Right$(PathIn, 1) <> "" Then PathIn = PathIn + ""
nPos = InStr(1, PathIn, "")
Do While nPos > 0
   If Dir$(Left$(PathIn, nPos), vbDirectory) = "" Then
      On Error GoTo Failed
         MkDir Left$(PathIn, nPos)
      On Error GoTo 0
   End If
   nPos = InStr(nPos + 1, PathIn, "")
Exit Function
   MkDirs = False
End Function

The depth of the code is confusing me. Where can insert a msgbox code to prompt a user for both states. For exmaple:

Code:Do While nPos > 0
   If Dir$(Left$(PathIn, nPos), vbDirectory) = "" Then
      intPrompt = MsgBox("Create the folder", vbInformation + vbYesNo)
      If intPrompt = vbYes Then
         On Error GoTo Failed
            MkDir Left$(PathIn, nPos)
         On Error GoTo 0
         Exit Do 'or should it be "Exit Function"
      End If
      MsgBox "Path already exists"
      Exit Do 'or should it be "Exit Function"
   End If
   nPos = InStr(nPos + 1, PathIn, "")

I know it's wrong, but just to show you what I need done. But I think i'm close...
The problem is, because of the "Do" loop, the msgbox will appear everytime the code loops. I just need it to appear once to prompt the user for a decision...

Any advice is appreciated...

Edited by - D-Race on 8/29/2005 1:30:16 AM

Need Code For Non-modal Msgbox
Hello, does anyone have existing code for a general purpose Msgbox that is non-modal.
WHat I would like is for a dynamic Msgbox to be created that stays always-on-top but does not require a response in order to cancel it.
This is for displaying an error msg on the screen and then allowing the user to fix the problem in some other form while the error msg is still displayed on the screen. After that the Msgbox can be cancelled.

MsgBox() - Unable To Get A Return Value To Run Code
I'm unable to get a return value from a MsgBox() using VB in MSAccess.

Private Sub CreateFloatingCopy_Click()

Dim intResponse As Integer

intResponse = MsgBox("Do you want to create a floating copy of this document?", vbYesNo, "Create Floating Copy")
If intResponse = vbYes Then
DoCmd.OpenQuery "CreateFloatingCopyAppendQuery", acViewNormal, acEdit
Debug.Print "Action Canceled!"
End If

Exit Sub

MsgBox Error$
Resume CreateFloatingCopy_Click_Exit

End Sub
Any suggestions? Thanks.

- Tonik
Edit by moderator: You can use [vb][/vb] to format your code. Click "Edit" or "Reply" on this post if you want to see how they work.

Retry/Cancel MsgBox Using VBA Code

When we do validations using data->validation , we get Retry/cancel MsgBox if we enter invalid data. And it wont allow the user to move to the next cell until he/She enters valid data into that cell.

The same I want to do using VBa Code using Ok/Cancel MsgBox.
The way I am trying to do this looks like ...

In WorkSheet_change Function

If Target.Address = "$D$10" Then
no = Sheets.Item(1).Range("D" & 10).Value
If no = 1 Then
x = no

resp = MsgBox("Pls enter valid data", vbOKCancel, "validation")
If resp = 1 Then
Sheets.Item(1).Range("D" & 10).Select
ActiveCell.Interior.ColorIndex = 5
ElseIf resp = 2 Then


End If
End If
End If

And the Call1 function is :

Private Sub Call1()
Sheets.Item(1).Range("D" & 10).Value = x
End Sub

Private Sub Worksheet_Activate()

x = Sheets.Item(1).Range("D" & 10).Value
End Sub

It is working fine for Cancel button. Means it gets the previous valid data when we click the Cancel button. BUt when we click the Ok button and moved to the cell it is not displaying any error message. Actually there is no code written for this Message to display..

Anyone please help me .......

Thanks in advance.....

MsgBox Doens't Come Up After Looping Through Code.
I am using ADODB to connect to an Access database with vb6.
Basically there are 3 forms with my program; the first form asks for a city & state where then the population is displayed in a listbox. If there is more than one zipcode for that city/state, another form pops up with all the zips displayed in a listbox and you select the correct zip code; then the third and final form pops up with the actual population for That zip code.
So either the first form is used or all three depending on the city/state.
OK, so I put in a selection(fist form) and if that selection doesn't exist in the data a msgbox pops up saying "nothing found, etc, etc., .
The problem is that after a population is displayed in the first formís listbox and I go to type in a city/state that is mispelled/doesn't exist....NO msgbox. If I close the program and go again the msgbox will pop up, but not if the program is left running.
How come I can only get the msgbox "Nothing Found" the first time through??
Here is my code:

Private Sub cmdexecute_Click()

If (txtcity.Text = "" And txtstate.Text = "") Then
MsgBox "Please Enter a City & State.", vbInformation, "Nothing Entered"
Exit Sub 'So rest of code doesn't run since not all of info hasn't been entered
ElseIf txtcity.Text = "" Then
MsgBox "Please Enter a City.", vbInformation, "No City Entered"
Exit Sub
ElseIf txtstate.Text = "" Then
MsgBox "Please Enter a State.", vbInformation, "No State Entered"
Exit Sub
End If

PopConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:Tempvb_projectsTest Projectspopulation.mdb;"

Set PopRecSet = PopConn.Execute("SELECT * FROM population WHERE po_name = '" & txtcity.Text & "' AND state = '" & txtstate.Text & "' ORDER BY pop2001")

Do Until PopRecSet.EOF
strPop = PopRecSet.Fields.Item("pop2001").Value
intZip = PopRecSet.Fields.Item("zip").Value

lstpop.AddItem strPop


With PopRecSet
If strPop = "" Then
MsgBox "No City or State Found. Please Check the Spelling & Try Again.", vbExclamation, "Nothing Entered"
End If
If lstpop.ListCount >= 2 Then
Unload Me
End If
End With

txtcity.Text = ""
txtstate.Text = ""

End Sub
If anyone can help I would greatly appreciate it.

Webpage Will Only Load, If A Msgbox Is In The Code
Hi All,

When I navigate to a webpage using:


I can wait for the page to load in my web browser control by doing:

VB Code:
While brWeb.ReadyState <> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE            Application.DoEvents()           End While

Now i need to click a button in the web browser programatically by doing (to call the next page):

(where item is the submit button)

The problem is now if I call:

VB Code:
While brWeb.ReadyState <> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE            Application.DoEvents()           End While

straight after this it thinks readyState is already complete because it doesn't seem to load the new webbpage in the first place(the url is still the same). It will only load the web page if I put a messagebox in my code after the "".

Why is this? Any ideas what I can do about it? I can't have a message box in there and if I don't it doesn't load the page?!?

Running Code Whileshowing Msgbox
Is it possible to run code whilst displaying a msgbox to the user.
I have created a database application using access and it is really slow to load.
I have a main logon window and it has two calls to two different modules, I know I could change this and I will.
The reason I think it is so slow is because I have to do a lot of DLookup's, this is to get the password and username and also to see if they even have an access account.
This means three seperate DLookup's.
Thats without checking to see if there account is locked.
Is there anyway I can make this faster or run code behind whilst the user is dealing with a msgbox.

Can anyone help.



Whats Wrong With This Code? Msgbox
private Sub Drive1_Change()
on error GoTo nodisk
Dir1.Path = Drive1.Drive
Text3.Text = Drive1.Drive

nodisk: MsgBox "There is no disk in that Drive", vbRetryCancel, "a Phrozen error"

If nodisk = vbRetry then
Dir1.Path = Drive1.Drive
Text3.Text = Drive1.Drive
Drive1.Drive = "c:"
Dir1.Path = "c:"
Text3.Text = "c:"
End If
End Sub

Thankz, Drew Love Your Stuff

Off The Excel Msgbox
when we have an active workbook open, and after we close it, the excel will prompt us to save there any way to off the prompt???

Use Excel's Msgbox Instead Of VB's
Problem: Excel report is being produced from VB app. Users require that Excel be visible while report is being populated. VB pops up a MsgBox when the report is done. Only when the user responds to the Msgbox does the code execute to quit and clean up Excel. However, with Excel visible, the VB Msgbox is obscured, giving the appearance that the app is hanging. What I want to do is somehow force that MsgBox to be on top of the Excel sheet.
Is there a way to do one of the following:
(1) use Excel's Msgbox instead of VB's -or-
(2) force VB's Msgbox to be in front of all other windows -or-
(3) reposition the VB Msgbox to appear in the upper lefthand corner of the screen
TIA for your help

Show A MsgBox...But Continue Exucating Code?
Is there a way to show a messagebox but continue exucating code?
I thought of using API Timers but...

Also please don't tell me to create my own


Need Code To Customize Buttons In MsgBox-EMERGENCY!
Please, emergency! I need code or whatever is needed to customize the buttons on a Message Box. I need to have 3 options: "Go to Main Menu", "Go Back", "Edit Another".

"Go to Main Menu" needs to hide and unload the current form and show and load the form I need.

"Go Back" is the same concept but different form

"Edit Another" stays at the current form, clears all textboxes, etc. on the form to make it ready for more data input.

I wish I had time to figure this out, but I don't. Please, any assistance and code will be GREATLY appreciated. Thanks for viewing my post.

I Wna This Code Give Me Msgbox It The Ping Sussec
 Private Declare Function GetRTTAndHopCount Lib "iphlpapi.dll" _
        (ByVal lDestIPAddr As Long, _
          ByRef lHopCount As Long, _
          ByVal lMaxHops As Long, _
          ByRef lRTT As Long) As Long

 Private Declare Function inet_addr Lib "wsock32.dll" _
         (ByVal cp As String) As Long

Public Function SimplePing(sIPadr As String) As Boolean
    Dim lIPadr As Long
    Dim lHopsCount As Long
    Dim lRTT As Long
    Dim lMaxHops As Long
    Dim lResult As Long
    Const SUCCESS = 1
    lMaxHops = 20
    lIPadr = inet_addr(sIPadr)
    SimplePing = (GetRTTAndHopCount(lIPadr, lHopsCount, lMaxHops, lRTT) = SUCCESS)
End Function

Excel Msgbox Popup
Is there any way to make a msgbox and/or a button pop up after a certain cell's content change? It would basically be used as a suggestion to calculate the values in the workbook.

Formatting A MsgBox In Excel

Can anyone (please) help me to format the text in a message box, I want the text to appear on separate lines, for e.g.

Text 1
Text 2
Text 3

and not (as is currently the case) Text 1 Text 2 Text 3

using the code MsgBox("Text 1 Text 2 Text 3")

is there a new line command?

Eliminating Excel MsgBox
I am opening a template excel file and witing to it with the below code. I would like to structure the save as line so that I do not receive the excel msgbox asking permission to overwrite existing file.

'Define Excel Template
Const TemplateFile= "F:ReportsExcelPistonsTemplate.xls"
'Define Excel Objects
Dim XLS As Object ' For the Application
Dim XLSheet As Object ' For the Worksheet

'Assign Excel Object [The Spreadsheet That this Program Reads].
Set objExcel = GetObject("F:AUTOLABVariables.xls")
objExcel.Application.Visible = False

'Create Excel Application
Set XLS = CreateObject("Excel.Application")
'Open the TemplateFile
XLS.Workbooks.Open FileName:=TemplateFile
'Rename the Template Worksheet
XLS.ActiveSheet.Name = "PistonMeasured"
'Create the Worksheet Object
Set XLSheet = XLS.Worksheets("PistonMeasured")

Dim ODZne as Integer
For ODZne = 1 to 3

'Parsing data to Spreadsheet
XLSheet.Cells(3, ODZne) = objData.s(5, 0)
Next ODZne

'Save TemplateFile as CurrentPistonMeasured
XLSheet.SaveAs FileName:="F:LABExcel FilesPistonsCurrentPiston.xls"

'Quit the Excel Application and Release the objects
'Release the Excel Object Variables
Set XLSheet = Nothing
Set XLS = Nothing

VB6 On Error Msgbox What Line Of Code Program Errored Out On?
Is there a way that I can specify in a msgbox or something if the code errors out what line of code the program was on when it errored out? I know i can do

VB Code:
on error resume nextif err.num <> 0 thenmsgbox err.num & " " & err.descriptionend if

but it doesn't tell me what line of code it errored out on? This is helpful for me when running the exe version instead of actually in visual basic. Thanks for your help.

Adding A Msgbox To A Cell In Excel
I'm creating a resume Template in Excel. The worksheet requires message boxes to appear when certain cell are active. For example, When cell A1 is active "Please enter your first and last name." should apear. Can I use the activecell function for this?

Finding Out The What Button Was Clicked In 'Msgbox' Code && Highlight On Focus...
For example...

    The user clicks a button to delete a name off a list (using a list object) and a Msgbox appears asking if he/she is sure...
Anyways if the user clicks yes, it gets deleted and No is clicked, it should do nothing. I can't figure out how to get the form to check which button was clicked.

Also... how do you highlight the text in a TextBox when it comes into focus at run-time, (whether selected by mouse or tab). It only places the cursor at the begining of the box without highlighting it. plz help...

CreateObject(Excel.Application) - Close It W/o Are You Sure? Msgbox
I've created an excel application to do some calculations. How would i close it, repressing the 'Do you want to save changes?' msgbox it displays.

I've tried XLApp.Quit

Is There A Way To Run Code From The Immediate Window The Same Window
Is there a way to run code from the Immediate Window the same Window the the debug.print data is printed

Code Window Is Not Immediate Window?
I have a

ri = Mid(CurWri, 9, InStr(CurWri, ",") - 9)
WinSock.Connect ByVal ri, ByVal Val(Mid(CurWri, Len(ri) + 1 + 9))

where ri is like ":connect,25".

When VBasic goes throuhg the code, I recieve an error Address is not available from this computer.

But when I write WinSock.Connect "",25 into an Immediate window, it connects sucesfully.

Need I always use Immediate window to connect?

Window Always On Top Code
I have a program that runs at full screen when the user logs on. I would just like to know some coding that will make this window be on top of everything that the user opens up

Need Code For Pop-up Window...
No title bar; No buttons; Single "bump" Border; And Text For A Message.
Would like API version.
I'll need the code to unload it also.

I've tried for two days and can't get anything I can control.
I can crash my program pretty effectively though!


.NET Code Window In VB6
is there any way to make put .net coding window inside vb6 ? the collapse/expand for each is very handy but I dont want to switch .net language for now, or if I manage to make my own window like .net how to set it as VB6 default code?

I know it's abit hard to do that but if you have any clue please share with me

S. mohammad Najafi

Code Window
hi ,
I want to lock my code window. others may see but not able to edit. Is it

How Can I Move A Window In Code?
I've tried with setwindowplacement, but that didn't work.

Can anyone help me with this , thanks

A VB Code Window... In Access?
I'm running Access 2003 with VBA.

I was looking at this site and noticed this handy (vb) (/vb) feature in the HTML. Example:

Private Sub Frame_Options_Click()
Dim VarOption
VarOption = [Frame_Options]
'MsgBox VarOption
If VarOption = 1 Then
Forms![Frm_Tasks].RecordSource = "Qry_Tasks_Current"
End If
If VarOption = 2 Then
Forms![Frm_Tasks].RecordSource = "Qry_Tasks_Completed"
End If
If VarOption = 3 Then
Forms![Frm_Tasks].RecordSource = "Qry_Tasks_All"
End If
End Sub

I'm wondering if there is any way to use the same thing on a form in Access?
I know this is HTML but... it would be Sooooo freakin' cool to have. The colors, duke, the colors!

Kill Code For Second IE Window
When using IE, if I do NOT want a second window to open (IE_NewWindow2)based on its height OR width, what code might work. Below is what I have, but I receive a compile error. THANKS.

If IE_NewWindow2.pixelHeight = [<= 8760] Or IE_NewWindows2.pixelWidth = [<=12165] Then
IE_NewWindow2.Visible = False
End If

Odd Problem With Code Window
for some reason i can't move my code window around because the title bar is all the way up up and away behind the menu of vb. i think this happened when chaning resolutions or something, anyway does anything now how to fix this so i can move my code window around again?

here is a screenshot of the problem:

No Tooltips In Code Window

maybe a stupid and actually not related to VB question, but ..

When I set a breakpoint and then step into the code line by line, normally when I put the mouse over a variable, the current value of the variable is displayed as a tooltip.

This suddenly stopped, for unknown reason (I suspect after I moved the Immediate window to another position).
Do you know how to restore those tooltips?
Now I have to type ?var_name in the Immediate window to see the current value, which is quite time-consuming

This is for VB6sp5 on XPsp1, and I don't have such problems with tooltips anywhere else, incl. they appear normally for VB toolbars etc.


Copyright © 2005-08, All rights reserved