Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with VBA programing

Hey ppl...I have a question and I was wondering if anyone could help.
designed a excel sheet and I want to download info off the net to th
work sheet specifically the 3 bond graphs at the top of this pag
http://money.cnn.com/markets/bondcenter/ Is this possible?

Also I would like to put something like a demo time limit on it, i
this possible? The company I work for has asked me to turn my workboo
over to this new company that we've merged with. I don't know a whol
lot about this company and I don't want them to be able to keep all m
hard work if I decide that the new company is not worth working for. I
anyone could help i would appreciate it. CyberStorm @ Tampabay.rr. co

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with VBA programing

CyberStorm,

Here is a VBA code snip that will put the images from the web into you
sheet. Note that instead of using the main web page that yo
specified, I right-clicked on each of the graphs and got the URL of th
individual gif file. This page looks like it has images whose name
probably don't change over time so this solution should work. If b
some chance the CNN people (actually bigcharts.com) change the addres
of the gif files you will have to re-think this solution.

'*** Begin code

Dim MyURL
Range("A1").Select
MyURL
"http://chart.bigcharts.com/custom/cnnmoney-com/markets/cnnmoney-5year-price.gifquote"
ActiveSheet.Pictures.Insert MyURL
Range("D1").Select
MyURL
"http://chart.bigcharts.com/custom/cnnmoney-com/markets/cnnmoney-10year-yield.gifquote"
ActiveSheet.Pictures.Insert MyURL
Range("G1").Select
MyURL
"http://chart.bigcharts.com/custom/cnnmoney-com/markets/cnnmoney-10year-price.gifquote"
ActiveSheet.Pictures.Insert MyURL

'*** End code

BTW... these images are copyrighted.

Cheers.

mjclar

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with VBA programing

Thanks for the response. On the second question: I found the answer.
found that excel is not very secure and anyone with an average offic
password cracker and knows a little about VBa can easily change you
settings but here's the code that I used if anyone is interested. I
Forces Macros, Hides the tool bars, and deletes the page after a give
time. If theres any problems please email me.



'Actual code to paste

'Includes forcing macros

'(To force macros
'in your workbook
'create a sheet on which you write a message
'such as "you must enable the macros if you want
'to use this workbook. Please close this
'workbook and reopen it enabling the macros").

'Hiding tool bars, and
'Putting a time limit on the workbook
'Make sure you change the date in "Sub Workbook_Activate" to whateve
date you want it to delete.


'Place first section in "ThisWorkbook" code


Private Sub Workbook_BeforeClose(Cancel As Boolean)

Application.ScreenUpdating = False
Sheets(1).Visible = True

For i = Sheets.Count To 2 Step -1
Sheets(i).Visible = xlVeryHidden

Next i

ShowToolbars True

End Sub


Private Sub Workbook_Open()

Application.ScreenUpdating = False
For Each sh In Sheets
sh.Visible = True
Next sh

Sheets(1).Visible = xlVeryHidden

ShowToolbars False

End Sub


Private Sub Workbook_Activate()
If Date = #7/25/2005# Then
ThisWorkbook.Saved = True
MsgBox "This file has expired, it will be deleted!"
ThisWorkbook.ChangeFileAccess xlReadOnly
Kill ThisWorkbook.FullName
End If
End Sub


++++++++++++++++++++++++

'Paste this in module 1 code


Sub ShowToolbars(ToBeSeen As Boolean)
Dim CB As CommandBar
For Each CB In Application.CommandBars
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
Next
End Su

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with VBA programing

Thanks for the response. On the second question: I found the answer.
found that excel is not very secure and anyone with an average offic
password cracker and knows a little about VBE can easily change you
settings but here's the code that I used if anyone is interested. I
Forces Macros, Hides the tool bars, and deletes the page after a give
time. If theres any problems please email me.



'Actual code to paste

'Includes forcing macros

'(To force macros
'in your workbook
'create a sheet on which you write a message
'such as "you must enable the macros if you want
'to use this workbook. Please close this
'workbook and reopen it enabling the macros").

'Hiding tool bars, and
'Putting a time limit on the workbook
'Make sure you change the date in "Sub Workbook_Activate" to whateve
date you want it to delete.


'Place first section in "ThisWorkbook" code


Private Sub Workbook_BeforeClose(Cancel As Boolean)

Application.ScreenUpdating = False
Sheets(1).Visible = True

For i = Sheets.Count To 2 Step -1
Sheets(i).Visible = xlVeryHidden

Next i

ShowToolbars True

End Sub


Private Sub Workbook_Open()

Application.ScreenUpdating = False
For Each sh In Sheets
sh.Visible = True
Next sh

Sheets(1).Visible = xlVeryHidden

ShowToolbars False

End Sub


Private Sub Workbook_Activate()
If Date = #7/25/2005# Then
ThisWorkbook.Saved = True
MsgBox "This file has expired, it will be deleted!"
ThisWorkbook.ChangeFileAccess xlReadOnly
Kill ThisWorkbook.FullName
End If
End Sub


++++++++++++++++++++++++

'Paste this in module 1 code


Sub ShowToolbars(ToBeSeen As Boolean)
Dim CB As CommandBar
For Each CB In Application.CommandBars
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
Next
End Su

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel programing rlenz Excel Discussion (Misc queries) 2 April 18th 06 02:41 PM
Macro programing Jason Trolian Excel Programming 4 June 5th 04 10:15 PM
Iteration programing namphong Excel Programming 0 February 3rd 04 01:49 PM
help with excel programing drummerboy827[_4_] Excel Programming 1 September 27th 03 03:31 PM
programing book Matt Excel Programming 1 August 1st 03 08:21 PM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"