Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Disable Data Connection

Hi,
I am using Activeworkbook.Refreshall in one of my functions.
But when I go offline its displaying dialog box "Microsoft Access Database
Engine" to connect again.
But I want to disable the dialog box or close the connection if I go offline.
Can anybody let me know how i can do this?
Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Disable Data Connection

A simple solution could be to copy paste values to a different worksheet at
the end of your subroutine.
Or maybe
Application.DisplayAlerts = False
based on a paritcular event, on Exit

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Roopa" wrote:

Hi,
I am using Activeworkbook.Refreshall in one of my functions.
But when I go offline its displaying dialog box "Microsoft Access Database
Engine" to connect again.
But I want to disable the dialog box or close the connection if I go offline.
Can anybody let me know how i can do this?
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Disable Data Connection

Hi Michael,
Thanks for the reply.
But I tried Application.DisplayAlerts = False
but its not working.
And about copy paste values,
I have connection to Sharepoint site in which my Budget file is resided.
I get data from budget file and if any changes in the file it should reflect
in my excel workbook.
Can you please tell me anyway I can achieve this.
Thanks alot.

"Michael" wrote:

A simple solution could be to copy paste values to a different worksheet at
the end of your subroutine.
Or maybe
Application.DisplayAlerts = False
based on a paritcular event, on Exit

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Roopa" wrote:

Hi,
I am using Activeworkbook.Refreshall in one of my functions.
But when I go offline its displaying dialog box "Microsoft Access Database
Engine" to connect again.
But I want to disable the dialog box or close the connection if I go offline.
Can anybody let me know how i can do this?
Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Disable Data Connection

This a generic copying subroutine posted in this discussion group a while
ago, but i should do the trick, you must tweak it, it uses column A if you
want a different column change the number 1 on the following line to the
column number you need
sh1.Cells(i,1).Text & " " & sh1.cells(i,2).Text
and change the sheet names to suit your needs.

Sub copydata()
Dim sh1 as worksheet, sh2 as worksheet
Dim numrows as string
sh1 = Workbooks("Book1.xls").Worksheets("sheet1")
sh2 = Workbooks("Book2.xls").Worksheets("Sheet1")
numrows = Application.InputBox("Enter number of rows")
if isnumber(numrows) then
for i = 1 to int(numrows)
sh2.Cells(i,1) = sh1.Cells(i,1).Text & " " & sh1.cells(i,2).Text
next
end if
End sub


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Roopa" wrote:

Hi Michael,
Thanks for the reply.
But I tried Application.DisplayAlerts = False
but its not working.
And about copy paste values,
I have connection to Sharepoint site in which my Budget file is resided.
I get data from budget file and if any changes in the file it should reflect
in my excel workbook.
Can you please tell me anyway I can achieve this.
Thanks alot.

"Michael" wrote:

A simple solution could be to copy paste values to a different worksheet at
the end of your subroutine.
Or maybe
Application.DisplayAlerts = False
based on a paritcular event, on Exit

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Roopa" wrote:

Hi,
I am using Activeworkbook.Refreshall in one of my functions.
But when I go offline its displaying dialog box "Microsoft Access Database
Engine" to connect again.
But I want to disable the dialog box or close the connection if I go offline.
Can anybody let me know how i can do this?
Thanks.

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
When I save a workbook(2007) w/ a data connection to htm no data? Robert Excel Discussion (Misc queries) 0 July 13th 09 01:39 AM
Importing:Data Connection Wizard Doesn't see Source Data - No Impo Exotic Hadron Excel Discussion (Misc queries) 0 October 1st 08 07:35 PM
always recheck data connection library for latest connection strin FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
always recheck data connection library in MOSS for latest data sou FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
Data Connection sharon Excel Programming 0 April 23rd 07 11:58 AM


All times are GMT +1. The time now is 09:34 PM.

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

About Us

"It's about Microsoft Excel"