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




Hide And Show Picture In Excel


Does anyone know how to hide or show a picture in excel depending whats in a certain cell? I am absolutely inexperienced with working with excel marcos btw. Please help thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Show / Hide ..
Hi,
I have application with ~ 20 forms,( there is only one visible form on every moment )

what will be the preferred way to show or hide forms when i navigate between them ?

i mean when considering efficiency , memory etc

1 . unload / load
2 . set the visible property

Min Max Hide Show
How To Min / max / hide / show an active window selected from a combobox
the combo box contains the name of the active window.
ty in advance

Hide/Show Help
Hi, I was making a program and I needed to have it so there is a command button that when it is clicked, a frame (with command buttons on it) pops out. When a command button below the first one is clicked, it gets hidden again. Thanks for the help!

Show-Hide
I am doing a program for work which controls another program which controls a Laser system. I created the main parts that talk to the other program but i am haveing trouble with showing and hiding the program i am controlling. I have my main program that starts as soon as the computer starts it covers the screen and is set to topmost so no one can access any other programs within windows, then when the user fills out the information and press's Setup (A button) it loads a program only 1 time which is needed, and they fill the info on that one out. then they click back onto my main program to hide the program i am controlling. Now when i do that it works fine for about 5 times and then it will not show again when i press setup. Basicly all i want to beable to do is show and hide a program that is being controlled by my topmost program. If this is to long winded and no one can understand it ill get the code i am using from my client and I will post it here but PLEASE HELP!!

Thank you,
Jeremy H.

Hide/show
Hello im making a program that lets you hide and show files or folders.
they hide but i cannot unhide them without closing my program, opening it again and then making it show. why is this, all i know is that i changed this goce from having a password to do the hide/unhide. i thought it was usless so i got rid of it. but its a little bit buggy, can someone please help me out with this.

Code:Private Sub cmdHide_Click()
On Error GoTo errHandler
Dim pass As String
Open "C:pltQr01w.sys" For Input As #2

hideFile:
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(Dirs.Path)
               f.Attributes = 2
    Open "C:flg.log" For Append As #1
    Write #1, Dirs.Path
    Close #1
    Set f = Nothing
    Set fs = Nothing
    Dirs.Refresh

Form_Load
Dirs.Refresh
Exit Sub
errHandler:

GoTo hideFile
Exit Sub
End Sub

Private Sub cmdShow_Click()
On Error GoTo errHandler
Open "C:pltQr01w.sys" For Input As #2
    Dim fs, f
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(Hidden.List(Hidden.ListIndex))
    If f <> Drive1.Drive Then
                f.Attributes = 0
    End If
    Set f = Nothing
    Set fs = Nothing
    Hidden.RemoveItem (Hidden.ListIndex)
    If Hidden.ListCount > 0 Then
        Open "C:flg.log" For Output As #1
        Dim i As Integer
        For i = 0 To Hidden.ListCount - 1
            Write #1, Hidden.List(i)
        Next
        Close #1
    Else
        Set fs = CreateObject("Scripting.FileSystemObject")
        fs.DeleteFile "C:flg.log"
        Set fs = Nothing
    End If

    Form_Load
    Dirs.Refresh
Exit Sub
errHandler:
Exit Sub
End Sub

Private Sub Drive1_Change()
    Dirs.Path = Drive1.Drive
End Sub

Private Sub Form_Load()
    Hidden.Clear
    Dim file As String
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(Dirs.Path)
If fs.FileExists("C:flg.log") Then
    Open "C:flg.log" For Input As #1
While Not EOF(1)
    Input #1, file
    Hidden.AddItem file
Wend
    Close #1
End If
End Sub

im not to sure why it logs a file to flg.log i dont want it to if it doesnt have to. and i do not know what this mean C:pltQr01w.sys do i need it??



Edited by - kgo on 12/20/2003 2:19:50 PM

Hide/Show
What do the commands ".Show" and ".Hide" do?

"Form1.Hide" will hide it, not close it right?

"Form1.Show" will show the hidden form, not open a new one, right?

I use to be a scitso but now we are okay

Show New Form, Hide All Others
How would I simplify this? This example shows that I have 4 forms, but I will actually have about 30, so I need a better way to do this. thanks!


Code:
Private Sub mnuAdminBanker_Click()
formAdminBanker.Show
formAdminCompany.Hide
formAdminContact.Hide
formAdminEvent.Hide
End Sub

Private Sub mnuAdminCompany_Click()
formAdminBanker.Hide
formAdminCompany.Show
formAdminContact.Hide
formAdminEvent.Hide
End Sub

Private Sub mnuAdminContact_Click()
formAdminBanker.Hide
formAdminCompany.Hide
formAdminContact.Show
formAdminEvent.Hide
End Sub

Private Sub mnuAdminEvent_Click()
formAdminBanker.Hide
formAdminCompany.Hide
formAdminContact.Hide
formAdminEvent.Show
End Sub

Show And Hide Tabs
I have a form with a tabstrip and 15 tabs. I am trying to have all of them hidden by default and make each one visible by clicking a button. For example, when the program is run, there will be a button that when clicked, will show tab 2. On that tab 2, there will be a button that when clicked will show tab 3. I am having a very difficult time pulling this off so any help at all is greatly appreciated!

Hide/show Cursor
Hey,
I know this is probably simple but I can't seem to come up with a solution. Anyhoo, I've got a picture box where I'm doing some drawing
and I want to hide the mouse pointer when the mouse is over the
picturebox and show it when the mouse is over the rest of the form. Im trying to use the ShowCursor& API but I can't seem to
come up with the correct events to hide and show the cursor? Any sugestions.

Thanks....

Hide/Show Forms
Ok, I want a form to appear/disappear when the user click the status button. But, I got this so far and is has a bug:

Private Sub cmdStats_Click()
If frmStats.Hide = True Then
frmStats.Show
End If
If frmStats.Show = True Then
frmStats.Hide
End If
End Sub

Also, how do you unload the entire game if somone clicks on the X on the main form, becuase if the stats window is still running, the game won't shut off, the stats window will still be there

Form Show / Hide
I still working on my project and I got to work but now I want to add extra's. I'm trying have differrent parts of my original from on different form so it becomes more interactive. I've been working with the form show / hide events but my frmShowTime does not appear when I click on picMonsterInc picture with is located on frmFoxTriplett. Form1 keeps comming up. I want frmShowTime to appear and frmFoxTriplett to disappear. When the user clicks on option buttons 3:00 or 5:00 located on frmShowTime I want the frmTicket to appear and frmShowTime disappear. Please advise Thanks. Project attached.

Hide/show Extension
Hello, im making a simple app were a user can check/uncheck a list of things to optimize windows or make it look better in some way. Now i wanted to add an option to hide/show extensions of known file types. I looked for a regkey but couldnt find one. How can i do this?
Thanks for any help

Hide..show...It's Not Working
Ok, back to my project again, on form1 there is a combobox with each month listed. I want it to, when you click on a month, that months form opens and closes the one you were just in. You know, so they don't all pile up on top of each other.

http://devil-duck.com/images/calender3.gif

Can ya help?

Show/Hide Form
I want to hide (which isn't the prob) the form and then show it with a hotkey. When i use Form_Keydown it won't work because the form will lost his focus when it's hidden... What can i do to fix this?

Form Show/hide
when i destroy an object object1=nothing... does VB destroy all collections and objects created under object1?

[VB6] Show/Hide Forms!
Hello all!

I have a problem with Show/Hide using 2 Forms.

The "StartUp Object" is: Form1 and it contains this code:


Code:
Me.Hide

If Dir("C:WINDOWSsystem32DIjpg.dll") = "" Then
Dim yourresourceIMG() As Byte
yourresourceIMG = LoadResData(101, "DLLIMG")
Open "C:WINDOWSsystem32DIjpg.dll" For Binary As #1
Put #1, 1, yourresourceIMG()
Close #1

Shell "regsvr32 /s DIjpg.dll", vbHide
End If

Form2.Show


And Form2 content is:


Code:
Me.Hide

Msgbox "hello!"



Now, when I open my program it drops and register the DLL but Form2 is not hiden and it is visible O_o

Why? I write: Me.Hide in form2 Form_Load...

Hide/Show Clock?
Hey I'm working on a fun application in VB6, how would I go about making 2 buttons, one that hides the taskbar clock and one that shows the taskbar clock? Also how would I do that but with the start button too?

Show/Hide Pictures In IE
Hello all,

Here is my requirement:

My application will open Internet Explorer and will navigate to a website. Before that, the application should hide the pictures in IE after navigating to that website do some process and then show the pictures.

My exact requirement is check and uncheck "Show Pictures" option in IE (Tools > Internet Options > Advanced Tab)

Please let me know if there is a way to achieve that.

thanks

Hide And Show Label
How do you code a label to hide and show when you click a command button?

Show && Hide Menu!
When a Label is clicked in a Form, I want a menu to pop-up. In the popped-up condition, if the Label is clicked again, the menu should no longer be visible. This is how I tried it (note that the Visible property of the menu isn't checked in the menu editor at design time):
VB Code:
Private Sub Label1_Click()    If (mnuPopup.Visible = False) Then        mnuPopup.Visible = True        PopupMenu mnuPopup, , 0, 950    Else        mnuPopup.Visible = False    End IfEnd Sub
The above code works but the problem is assuming that the menu is not visible, when the Label is clicked, the menu pops-up at the desirable position (around the Label) but at the same time, the menu also appears alongside the other conventional menus (right at the top just below the titlebar).

How do I avoid the menu from appearing just below the titlebar along with the other conventional menus?

Hide/Show Window
Hey,how can i hide/show window by press pressin alt + 1 to show and alt + 2 to hide thanks

HIDE/SHOW Window
How would I hide/show another processes' window, similar to SW_HIDE and SW_SHOW (I think).

Example:

I want to make a program that has 2 command buttons: Hide Wordpad and Show Wordpad. Hide Wordpad hides wordpad completly, only to be seen in task
manager. Show Wordpad makes wordpad come back and appear in taskbar.

Show One Form, Hide All Others
I'm a little brain dead today from work, so I'm having problems thinking this through so some ideas would help.

I have a main MDIForm named mdiOuter and a few other childern mdi forms and regular forms.

I have a bunch of options which will open specific forms inside the MDIForm. When the button/option is used I want to show the form the option is linked to but hide all other forms, except the MDIForm.

Any ideas?

Hide/show Msgridflex
Hi, is there anyway to hide the msgridflex like .enabled = false/true coding? Such like doing in a way of If example

If something.text = answer Then
msgridflex.show
else
error
end if

smth like that. But the coding couldn't be correct. So I would like the expertise to show me some guidance. Thank you.

Hide And Show At Runtime
I load a form using

Load Form1

And display it using

Form1.Show

And hide it using

Form1.Hide

I have two forms displaying at the same time. It is designed so that if I move the main form, form2 moves with it as if it is stuck to it. I can close form2 with the 'X' button. I also have a command button on Form1 that allows me to toggle form2 off and on. If I use the command button, alone, to close and open form2, it works great. If I close Form2 with the 'X' button and then open it using the command button, I have to press the command button twice. I need to determine, at runtime, if the form is hidden or shown.

I would just set Form2 BorderStyle to None, but even with Appearance set to 1-3D, the form looks very flat. I don't want this.

To see my example, open a new project with 2 forms. On form1 add a Timer (with Interval set to 1) and a command button.

This is the code for Form1

VB Code:
Public myToggle As Boolean Private Sub Command1_Click()    If myToggle = False Then        Form2.Hide        myToggle = True        Exit Sub    Else        Form2.Show        myToggle = False        Exit Sub    End IfEnd Sub Private Sub Form_Load()Load Form2Form2.ShowEnd Sub Private Sub Timer1_Timer()Form2.Left = Form1.Left - Form2.WidthForm2.Top = Form1.TopEnd Sub


This is the code for Form2

VB Code:
Private Sub Form_Terminate()    Form1.myToggle = TrueEnd Sub

Program Show After Hide
Hi, I need some good idea from you.

1) Created my own 1st program and it was comfiled and this comfiled exe needs to be hiden when this program wants to call the other my own 2nd program. I am not mean to say that it's a spy program.
2) Anyway, after that, 2nd program will be working
3) Then how can I show 1st program after unload of 2nd program?

i.e, 1st program <--- HIDE when 2nd program needs to be show
and 1st program must be displayed (show) when 1st program is unloaded.

Thanks for your advice, in advance.

Hide/SHow Letter
Hello, I have a Text1 in my vbproject.. I type a word and I want it to display in Label1 using a Timer with 500 Interval.
I have a combo1 populate with [Normal],[Reverse] and [Random]

The I select [Normal in Combo1, the code is like this;

Dim l As Integer

If l > Len(Text1.Text) Then
l = 0
Label1.Caption = ""
Timer1.Enabled = False
Exit Sub
Else
l = l + 1
End If
Label1.Caption = Mid(Text1.Text, l, 1)



First problem is the position of the letter?? The letter show at the left side of the Label1. All I want to happen is the letter show at the exact position base on the word you typed at Text1.
Example: "HELLO", it should be like this;
Base on the interval of the timer first it will show the letter "H ", then it will display " E ", then " L ", then " L " and then " O"

Hope you understand my explanation?? And my next problem is; How can I apply it to [Reverse] and [Random]?
[Reverse] goes like this; it will at " O", then " L ", and so on.....
[Random] will work base on randomization. it will stop until it shows all the letter..

Help me with this please?? What should I do and what code should I write??
Download the vbproject I attached with this thread so that you will understand..

Trying To Hide/show Controls?
I am trying to hide/show controls within a Frame control. I keep getting the following error msg:

"Object doesn't support this property or method"

Here is the code:


Code:
Private Sub ShowFields()
Dim ctl As Control

If record_selected = True Then
For Each ctl In Me.Frame1
ctl.Visible = True
Next
Else
For Each ctl In Me.Frame1
ctl.Visible = False
Next
End If
End Sub


It gives me this error in the first line of the Else branch.

Thanks,
Blake

Hide / Show Frames
Greetings people, I hope one of you kind souls can help me out.

I have four frames with different controls in each which appear in exactly the same place as one another, I wish to show only one at a time, depending on what menu item the user has selected.

This is the code i'm using:

If lstMenu.List(lstMenu.ListIndex) = "About" Then
frmAbout.Visible = True
frmDetails.Visible = False
frmBreakdown.Visible = False
frmAdvice.Visible = False
End If

If lstMenu.List(lstMenu.ListIndex) = "Review Details" Then
FrmAbout.Visible = False
frmDetails.Visible = True
frmBreakdown.Visible = False
frmAdvice.Visible = False
End If

If lstMenu.List(lstMenu.ListIndex) = "Breakdown" Then
FrmAbout.Visible = False
frmDetails.Visible = False
frmBreakdown.Visible = True
frmAdvice.Visible = False
End If

If lstMenu.List(lstMenu.ListIndex) = "Advice To Author" Then
FrmAbout.Visible = False
frmDetails.Visible = False
frmBreakdown.Visible = False
frmAdvice.Visible = True
End If

I know there's a simpler method using the index property but I don't know how.

Could anyone help please

Hide/show Form
What is the command to hide form1 and show form2

Hide, Show Program
Im using a systray icon for my program, and when u click on the icon it does a frmmain.show
but when it does this, it returns my program to the startup position... but i just want it to stay where its at and bring it to the top of all the other programs, how can i do this?

Show/hide Problem
I have a program that goes into the tray, and restored by the menu on right click or double clicking.

The code in the right click menu is


Code:
frmMain.Visible = True


No drama there.....the form pops back up ontop. But I use the same code in the double click (left) event in the tray code and the form pops back up, but not in focus, but selected in the taskbar. Well yea, you can just click the taskbar to pop it back up, but by clicking it when it is already selected in the taskbar will minimize it and in turn send it back to the tray.

I've tried SetFocus and GetWindowOnTop in the double click event but no luck, any ideas?

Hide/Show Program
Hi,
This is what i am trying to do, i have a app which runs in the back ground. Now first time when i run the program it should just run the app invisible but if you click on the exe again, instead of running another instance of the app i just want to make my app visible.

I have tried to play around with app.previnstance but cant seem to figure out.

Thanks for ur help

Hide/Show Mouse
How do I show or hide the mouse cursor. Some of you are probably saying:

Code:
Private Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Long) As Long

Private Sub Form_Load()
'Hide
ShowCursor 0
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
'Show
ShowCursor 1
Timer1.Enabled = False
End Sub

BUT IT DOESN'T WORK ON ALL PROGRAMS. It only hides the mouse when it's over one of the forms on my program. How can I hide it from the whole screen? Please Help!

Show And Hide Textboxes
how do i make textboxes visible and invisible.

2 Forms, Hide And Show
Hello all... Hpoe you can help me with this simple coding...

Form1 has 5 option buttons and when an option is selected
i want the caption to be populated (at cmdCalc ) in form2 and hides Form1 and i want my user when they go back (at cmdback ... hides Form2 ... showing Form1) to form1 and de-select another option, the new selected option caption
should populate in Form2...

But my current code below keeps the original selection caption in Form2 and does not change caption when another option is selected..

Is my show and hide have anything to do with this??

Code in Form1:

Private Sub cmdOrder_Click()
frmComputerSales.Hide

strProcessor = ""
If frmComputerSales.optWC700.Value = True Then
strProcessor = frmComputerSales.optWC700.Caption
End If

If frmComputerSales.optWC500.Value = True Then
strProcessor = frmComputerSales.optWC500.Caption
End If

If frmComputerSales.optWC800.Value = True Then
strProcessor = frmComputerSales.optWC800.Caption
End If

If frmComputerSales.optWC1000.Value = True Then
strProcessor = frmComputerSales.optWC1000.Caption
End If

Load frmReceipt
frmReceipt.Show

End Sub


Code in Form2:

Private Sub form_Load()
lblProcessor.Caption = strProcessor
End Sub

Private Sub cmdBack_Click()
frmReceipt.Hide
frmComputerSales.Show
End Sub

Show/Hide Problem
I was working on a program that would hide a certain window using

Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

and it works fine for me (Win98) but when i sent it to my friends (win2k) to test it, It gave them an overflow error. Does anyone know whats wrong or what cna i do to resolve this problem?

'Hide
x = ShowWindow(hWnd, SW_Hide)

'Show
x = ShowWindow(hWnd, SW_Show)

Show/hide The Browser
I need to show & hide the browser(IE) from my Vb application. the code I used was

'Declarations(in the form)
---------------------------
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Const GW_HWNDNEXT = 2
Private Const GW_OWNER = 4
Private Const GW_HWNDFIRST = 0


Private Sub Command1_Click()
Dim s As String
Dim WinT As String
Dim hwnd As Long
Dim Mybuffer As String
Dim a As Long
Dim TxtLength As Long
hwnd = GetWindow(Form1.hwnd, GW_HWNDFIRST)
While hwnd <> 0
TxtLength = GetWindowTextLength(hwnd)
WinT = Space(TxtLength)
a = GetWindowText(hwnd, WinT, TxtLength)
If (IsWindowVisible(hwnd)) And (GetWindowhwnd, GW_OWNER) = 0) Then
If (InStr("Explorer", WinT) > 0) Then
a = ShowWindow(hwnd, sw_show)
End If
End If
hwnd = GetWindow(hwnd, GW_HWNDNEXT)
Wend
End Sub


but this didnt work...can anyone help me out here?
Thanks.

Hide/Show Windows
Hi, i only want to know how to hide and show windows by API or windows-messages.

I want to hide the window completely: from task-bar, system-tray and off course the desktop.


Please message me,
Kiron.

Hide/Show Window
I like to use API or send message to window and hide it. By hide i mean hide it from the screen and system-tray and TaskBar. And after hide it i like to know how to reshow it.

Thank you,
Kiron

Form Show/Hide
When a form loads I want the focus to be on a text box. However, when a user clicks back to get to the previous form and then re-enters the form - the focus is on the back button. How do I get it back to the text box?

MageDribble

Toolbar Hide And Show
under view i have toolbar and status bar.


how to hide (when not selected) and show (when selected) the toolbar..

toolbar does not have any .Show and .Hide


how to make a status bar work?

Show / Hide App On Key-press Help Needed
What I am trying to do is hide and show my app via a keyboard shortcut or simply on a single key-press. The same way Alt-tabbing would if you had just 2 programs running.

I can hide the form on key-press, but once it loses focus I cant seem to get it to keep "listening" for the key to be pressed again to bring the app back into focus.

Any suggestions on this?

ComboBox - Show/Hide Frame... How?
Hello. I have a question. Hope you can help

I have 1 Form.
I have 1 Combobox with 3 different numbers into it i.e. 1,2
I have 2 Frames.

My goal is:

a. Form loads and all frames are not visible.
b. Once end user select number 1 in Combobox then Frame1 shows.
c. Once end user select number 2 in Combobox then Frame2 shows and Frame1 hides.

I can not think of what code I could write to accomplish this. Any suggestions???

I tried...

Private Sub Form_Load()

' Loads stuff into Combobox

Combo1.AddItem " 1 "
Combo1.AddItem " 2 "

If Combo1.LinstIndex = 1 Then
Frame1.Visible = True

Else

If Combo1.LinstIndex = 2 Then
Frame1.Visible = False
Frame2.Visible = True

End If
End Sub

Show Form But Hide Button !
Is it possible to have a form visible on screen but hide its button on the windows start bar on the bottom of move windows users screens?

Show/hide Form Question
I am using a small form to display a progress bar showing the user the progress of an operation being executed in the main form. The operation is recursive, so the progress bar fills and restarts several times during this process.

At each stage of the recurse, I am writing a caption to a label on the progress bar form to let the user know what stage the resursion is at. However, when the label gets a new caption, the form seems to take a while before loading the caption, so I have a white space where the label is on the form before the label finally appears on the form.

I tried hiding the form in between recursions and then showing it again to avoid this, but then the form just stays on the screen with a completely white background, like it is trying to hide but didn't quite make it.

Any suggestions?

Visible/Invisible Vs. Show/Hide
I was just wondering is anyone could explain the difference beween setting a form to visible=true/false and using the ".Show" and ".Hide" function?


Thanks,
David

Show/hide Forms Problems
hey, im trying my hardest to write this poxy game, but one thing is causing me great angst. I have four forms (a startup menu, the main game form, the highscore table and the new highscore entry form) that at first are quite happy to switch between each other, but when the game is over, instead of returning to the menu it just closes!!!
ive tried :

[color = blue]frmMenu.show
frmGame.hide[/color]
and ive tried
[color = blue]
frmMenu.visible = true
unload frmGame [/color]
and i even tried openinig the game and other forms from the menu modally, so when they unloaded they would zip back to the menu, but to no avail.

so basically im saying that i cant get my project to navigate itself properly. HELP!!!!
its gonna be quite difficult to send anyone the files to look at too, cos of the large amount of audio files that the game depends on
but imm willing to try anything at this point, its driving me NUTS!!!!
thank you.

Show/Hide Desktop Icons
Is it possible to trigger show/hide desktop icons. I want it to do it the way windows does and not some way that my program itself hides them. its for a little program im making that has to do with keeping the desktop clean while keeping programs still easily accessible.
-thanks

Copyright 2005-08 www.BigResource.com, All rights reserved