Hi folks,
I have a functioning timeline style Visio document linked to an external excel workbook that is working fine. I just need a little something extra.
I wanted the Visio document to display the current linked excel document name and address.
I am using the following code to refresh the external excel document. Works good.
I do it this way because I did not want the users to have to open the excel document for any reason.
This excel document gets its updates from multiple sources.
Note: the (ME.LocationName) is a text box located inside the Visio document that allows the users to point to a different excel workbook by address location and name should the need arise.
Function OpenSaveExcel()
Dim objXLApp As Object
Dim objXLBook As Object
Set objXLApp = CreateObject("Excel.Application")
Set objXLBook = objXLApp.Workbooks.Open(Me.LocationName)
objXLApp.Application.Visible = False
With objXLApp.ActiveWorkbook
.RefreshAll
.Save
.Close
End With
objXLApp.Quit
End Function
Thanks for your time.
the recordset properties has the query string stored as one of the properties.
https://msdn.microsoft.com/EN-US/library/office/dn508175.aspx
hth,
al
Thanks for the response, I had help with the fancy VBA that I posted earlier, so I may not be the sharpest tool.
I looked at the Application.ActiveDocument.DataRecordsets from a macro I recorded as an effort to understand this logic.
I can't seem to get the correct coding into the Open Document routine.
I am attempting to get a text box within the Visio document to display the current linked address for the excel document it is reading data from.
Thanks for your patience.
SubPlanner
If left alone long enough I will get my own solutions. Thought I would share this one.
Since my Visio drawing is linked to an excel workbook I figured I can get the file and path name from excel then display it in the visio drawing as I see fit.
In excel paste these formula's into any cell.
Path: =LEFT(CELL("filename"),FIND("[",CELL("filename"),1)-1)
File: =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
SubPlanner
Thanks for the submission and sorry for the lack of help.
It probably was too special.
Thanks Yacine for your follow up.
I do appreciate your help in this forum as others do I am sure.
I will try my best to keep a two way flow of information with my problems and solutions.
SubPlanner.
Browser ID: smf
(is_webkit)
Templates: 1:
Printpage (default).
Sub templates: 4:
init,
print_above,
main,
print_below.
Language files: 1:
index+Modifications.english (default).
Style sheets: 0:
.
Hooks called: 56 (
showintegrate_autoload, cache_get_data, integrate_pre_load, integrate_load_session, integrate_verify_user, cache_get_data, integrate_user_info, integrate_load_board, cache_get_data, integrate_board_info, cache_get_data, integrate_allowed_to_general, integrate_pre_load_theme, cache_get_data, integrate_allowed_to_general, integrate_simple_actions, integrate_allowed_to_general, integrate_load_theme, integrate_pre_log_stats, cache_put_data, integrate_actions, integrate_pre_parsebbc, integrate_bbc_codes, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_menu_buttons, integrate_current_action, integrate_theme_context, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general)
Files included: 25 - 925KB. (
show/home/iw0lkfe3x6cq/public_html/vgforum/index.php, /home/iw0lkfe3x6cq/public_html/vgforum/Settings.php, /home/iw0lkfe3x6cq/public_html/vgforum/cache/db_last_error.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/QueryString.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Auth.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Errors.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Load.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Security.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Compat.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Db-mysql.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApi.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApiInterface.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/APIs/FileBased.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Charset.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/Metadata.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/QuickCheck.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Session.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Logging.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Class-BrowserDetect.php, (Current Theme)/languages/index.english.php, (Current Theme)/languages/Modifications.english.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Printpage.php, (Current Theme)/Printpage.template.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/CaseUpper.php)
Memory used: 777KB.
Tokens:
post-login.
Cache hits: 8: 0.00161s for 22,301 bytes (
showget modSettings: 0.00038s - 19982 bytes, get known_languages: 0.00020s - 1277 bytes, get board_parents-0: 0.00010s - 2 bytes, get permissions:-1: 0.00009s - 50 bytes, get theme_settings-1: 0.00012s - 980 bytes, get log_online-update: 0.00001s - 0 bytes, put log_online-update: 0.00070s - 10 bytes, get menu_buttons--1-english: 0.00001s - 0 bytes)
Cache misses: 2: (
showget log_online-update, get menu_buttons--1-english)
Queries used: 10.
[Show Queries]