# How to create friendly excel popups!



## Hatcheda (May 16, 2007)

Apply the following code to a module. or the workbook for a workbook open event.


```
Sub CtrlX()
Application.ScreenUpdating = False
WS = ActiveSheet.name
Sheets("Sheet3").Activate

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.mygoalmanager.com/goals/quoteRss.asp", Destination:=Range("A2"))
.name = "quoteRss":   .FieldNames = True:   .RowNumbers = False
.FillAdjacentFormulas = False:   .PreserveFormatting = True
.RefreshOnFileOpen = False: .BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells: .SavePassword = False
.SaveData = True:  .AdjustColumnWidth = True
.RefreshPeriod = 0: .WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone: .WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True: .WebSingleBlockTextImport = False
.WebDisableDateRecognition = False: .Refresh BackgroundQuery:=False
End With
Cells.Replace What:="document.write(", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Cells.Replace What:="
*", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Sheets(WS).Activate
Application.ScreenUpdating = True
MsgBox Sheets("Sheet3").Range("A2")

End Sub
```

Just having some fun!


----------



## absquatulation (May 17, 2007)

What does it do?


----------



## SydneyGeek (May 17, 2007)

Try it out. 

Each time you run the code you get a different quote from the target website. 

Enjoyed it :wink:

Denis


----------



## Lewiy (May 17, 2007)

I’m gonna plug this into my colleagues’ workbooks to fire up when they open Excel every morning as a thought for the day!

Most amusing!


----------



## Greg Truby (May 17, 2007)

OK - Hatcheda - to continue our discussion...

Customizing _Outlook Today_ with: 
	
	
	
	
	
	



```
<BODY> 



 

<TABLE WIDTH="60%" ALIGN="center"> 
 <TR> 
  <TD> 
   <font face="verdana" size="3" color="blue"> 
   <script language='JavaScript' src='http://www.mygoalmanager.com/goals/quoteRss.asp'> 
   </script></font> 
  </TD> 
 </TR> 
</TABLE> 



 

</BODY>
```

How does one do that?


----------



## Hatcheda (May 17, 2007)

Well, the outlook today page is really just a webpage . . . so
you can link any page using the following:

Make a backup of your system registry. 
Run the Registry Editor (regedit.exe). 
Navigate to the HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Today subkey. 
Create a new STRING value, named URL. 
For the value of URL, enter the address of the web page you want to view when you click Outlook Today. 

In my case, I wanted to keep the outlook page, not something like yahoo 
But I wanted it different, So I downloaded the pack from
http://www.microsoft.com/downloads/...66-0d59-4755-bcb2-499d966f00c5&DisplayLang=en
and edited the outexmpl to my liking: It includes links to my most used sites and a daily quote at the bottom!  -Added by applying the code posted earlier to the bottom.

Add in no way have I ever changed the real page. -So I could just delete the URL STRING value

The pack comes with a great white paper with far more than you may want to know. -But there if needed!


----------



## Greg Truby (May 17, 2007)

> ...The pack comes with a great white paper with far more than you may want to know...
> ~Hatcheda



Cool.    Now I have something to read in the event some *@#$%~!! nicks the comics from the lunchroom again today.  Thanks!


----------



## Hatcheda (May 17, 2007)

Cute!


----------



## Greg Truby (May 17, 2007)

> Cute!
> ~Hatcheda



 At 6'4", 300+ lbs and with a back that's fuzzier than most fellers' chests, I must say I don't hear that word directed at me too often.


----------



## Hatcheda (May 17, 2007)

lol


----------



## Scott Huish (May 17, 2007)

Couldn't you just right click the main folder in Outlook, Click on properties, then Home Page  and change the URL there rather than edit the registry?


----------



## Hatcheda (May 17, 2007)

Some people can, but not if your workplace locks you out!
I can't 
Many people that work at bigger companies can't. -There was once a security concern long since past.

The work around is straight from MS and is mentioned in the white paper on the topic


----------



## hatman (May 21, 2007)

I would replace 
	
	
	
	
	
	



```
.RefreshStyle = xlInsertDeleteCells
```
with 
	
	
	
	
	
	



```
.RefreshStyle = xlOverwriteCells
```
 to prevent an error from ocurring when you reach the 257th query (assuming that the workbook is saving itself each time... if it isn't, it desn't matter).

Otherwise, it's VERY promising...


----------



## Hatcheda (May 21, 2007)

hatman - You make a very good point!


----------



## Scott Huish (May 21, 2007)

> Some people can, but not if your workplace locks you out!
> I can't
> Many people that work at bigger companies can't. -There was once a security concern long since past.



That may be true, but it's hard to see the logic that they would block you from changing your Outlook Today page, but will more than gladly let you edit the registry. ???


----------



## Hatcheda (May 21, 2007)

Laptop access is admin, unless booted from network. -Then admin with some restrictions, but not registry. 

Outlook access is pulled from exchange server. -Even with full admin this can not be changed using outlook.  -This is based on an old security threat whereby hackers exploit the html to access/control/harm outlook.

And yes, makes no sense, but I wont complain about having too much access in some areas! 

In either case, I think that removing URL to reset the page is easier than remembering the old path correctly


----------

