Tuesday, December 16, 2008

Microsoft Excel - VBA Function Get Active File Name

'just paste this into a VBA module
'johnson.1965@gmail.com
'14-dec-08

Function GetNameOfFile() as string

Dim wb as Workbook
set wb = Application.ActiveWorkbook

GetNameOfFile = wb.FullName
End Function

Tuesday, November 13, 2007

DLP Screen Damage :: How to Fix - Water damage

Problem: My daughter tried cleaning the screen of my Mitsubishi DLP with Windex. She used about 6 ounces of product, so you can imagine the amount of damage to the screen, as well as my state of mind. The product left a visible water line in the screen. Is it possible to fix this type of water damage (Windex)?

How was I going to get this problem fixed? Pay? I called a local TV Repair shop, and they quoted out $650.00. That seemed like a lot of money for this type of damage, so I searched and searched for a different solution.

None. I could pay to get it fixed, or try and fix it myself (damage already done).

I decided to try and fix it myself.

Solution:
I have a camcorder, so I recorded my steps. I am notorious for ending up with "where did this go" parts! Glad to report, I didn't need to review the movie to help put this DLP back together.

The Equipment List.
At least four hours of contiguous time.
Phillips head screw driver ( I call it the plus screw driver to my wife )
Blow Dryer (did not use heat, only for air circulation)
Micro-fiber cloth (3)
Bowl of 1/3 vinegar, 2/3 water
Two (2) people ... Don't try this solo. You may have to blame someone later!

Steps
Remove "screen housing" from DLP. (about 18 screws)

Placed "screen housing" onto a FLAT CLEAN surface.

Removed about 10 more screws to remove plastic screens from "screen housing".

There are two pieces of plastic protected by the "screen housing".

The front piece very hard and firm, and a piece ontop that is more paperish thin.

At the top of the two pieces of plastic, there seems to be a rail of metal connecting the two pieces. I didn't have to mess around that area, my damage was from the middle down.

You could see the WATER trapped between the two pieces of plastic.

Separate the two pieces (Have second person pull back the thin layer of plastic). Be very careful. The thin piece looks very fragile.

DO not pull back hard, you may rinkle the plastic, which would be a bad thing.

With a DAMP micro-fiber cloth, (using vinegar and water solution), start removing windex damage.

Wipe on with solution, with another micro-fiber cloth (water only), remove vinegar solution from hard plastic. Use blow-dryer to "speed up" the air drying process.

I had to repeat this step about 10 times to clean up the damaged plastic.

Now, you must clean the "thin plastic piece" ... be real careful. Repeat cleaning until you are happy with the results.

I used the blow-dryer (air only) for about 20 minutes, making sure I removed all the moisture.

After about 4hrs of cleaning, I decided to put the "screen housing" back together.

I then reattached the "screen housing" to my DLP.

I turned on the TV .... (EXCELLENT)

I just saved myself $650.00

--------------------------
The TV guy warned me before I started, this would invalidate my warranty. I proceeded on my own behalf.

Thursday, August 23, 2007

ASP.Net 2.0 - Web App Disabled

Problem:

How to let users know the web app is down for maintenance?

Solution:

Create a file in the root called: app_offline.htm

The contents of app_offline.htm is information to inform the user the site is down for maintenance.

That's it.

When you are ready to come back online, rename app_offline.htm to something else.

Wednesday, August 22, 2007

Visual Studio 2005 - Recent Projects

Problem:

On the "Start Page" of Visual Studios 2005, their is a section called "Recent Projects." This section will list projects you've worked on previously.

How to remove unwanted projects from this list.

Solution:
1) Load regedit
2) Locate registry entry

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList


3) Delete line items as necessay

Thursday, July 26, 2007

ASP.Net Web Form Disable Autocomplete

Problem:

Textbox control tries to auto complete entry.

A List of previously entered values are presented to the user to select.

How do you turn off this feature?


Solution:

<form method="post" autocomplete="off" >
</form>

that's all it takes.

one note. this disables auto complete for the entire form.

Wednesday, July 25, 2007

Visual Studio 2005 .: Go To Definition... I Don't Want The Metadata

Problem:
Programming in Visual Studio 2005.
Have a Web Form with some user controls.
Drop into the code behind of the web form, and then try and right click on a method of a user control. VS2005 will redirect you to some Metadata class object file.

Useless I say, useless. In this file, you will see the definitions for all the controls on the user web control.


Solution:
1) When you start up a new project in visual studio 2005
File -> New Project ->
Project Type :: select c#
Visual Studio Installed Templates: ASP.Net Web Application
2) Build Application
a) make sure bin folder exists
b) build web application

3) Most IMPORTANT STEP
a) open solution explorer
b) right click on "references"
c) click on add reference
d) click on "browse" tab
e) click on solution DLL in Bin folder


Visual Studio 2003 works fine. I guess the programmer who wrote this feature no longer works at Microsoft.

Monday, April 30, 2007

ASP.Net Custom Control accessing Master Page

Problem: I have a custom control (.ascx), and want to access a label control on the masterpage.

Default.aspx uses MasterPage.Master
CtrlChild.ascx is embedded into Default.aspx


Solution:
public partial class CtrlChild : System.Web.UI.UserControl
{

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

MasterPage mp = (MasterPage)this.Parent.Page.Master;
Label lblUN = (Label)mp.FindControl("lbl_master_user_name");

}
}
}