Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unable to delete file from Sharepoint Server Library using VBA (Ex

I have an Excel application which needs to move the workbook to different
Sharepoint library (directory) depending on the step in the process. The
application is a combination of Worksheets and VBA modules. Each step is
initiated by clicking a command button that is embedded in the excel
worksheet. The current workbook is then moved to the new directory. The
move is accomplished via a SaveAs command.

What I'm having problems with is deleting the original version of the
workbook left behind after the new file has been saved in the new
directory/library. I have tried Kill and the FSO.DeleteFile method with no
results. I want to accomplish this using VBA within the application workbook.

I have accomplished this a number of times in prior projects outside of
Sharepoint server. This is my first project using Sharepoint Server, which
may account for part of the reason (not being familiar with the correct way
to do this in the Sharepoint environment). I can even run this application
on my local drive with no problem.

Is there a solution or direction I can look in to resolve this?? Anyone who
can assist, please let me know as soon as possible.

Thanks,

Ken Etter

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Unable to delete file from Sharepoint Server Library using VBA (Ex

I've run some macros from within excel on Sharepoint server and the way I
accessed the files was using a mapped drive. It might work if you accessed
them that way.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

I have an Excel application which needs to move the workbook to different
Sharepoint library (directory) depending on the step in the process. The
application is a combination of Worksheets and VBA modules. Each step is
initiated by clicking a command button that is embedded in the excel
worksheet. The current workbook is then moved to the new directory. The
move is accomplished via a SaveAs command.

What I'm having problems with is deleting the original version of the
workbook left behind after the new file has been saved in the new
directory/library. I have tried Kill and the FSO.DeleteFile method with no
results. I want to accomplish this using VBA within the application workbook.

I have accomplished this a number of times in prior projects outside of
Sharepoint server. This is my first project using Sharepoint Server, which
may account for part of the reason (not being familiar with the correct way
to do this in the Sharepoint environment). I can even run this application
on my local drive with no problem.

Is there a solution or direction I can look in to resolve this?? Anyone who
can assist, please let me know as soon as possible.

Thanks,

Ken Etter

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Unable to delete file from Sharepoint Server Library using VBA

Barb,

I tried your suggestion, but it won't let me map a drive at the root
directory. Because we have multiple subdirectories, one for each step in the
process, this will not work.

In addition, I am already questioning the feasibility of creating map drives
that would require drive letter to be stored in the filepath for each step
directory. If a company manager trying to use this did not have the same
drive mapping, the application would not work for him.

Any other suggestions would be great and are appreciated.

Thanks,

Ken


"Barb Reinhardt" wrote:

I've run some macros from within excel on Sharepoint server and the way I
accessed the files was using a mapped drive. It might work if you accessed
them that way.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

I have an Excel application which needs to move the workbook to different
Sharepoint library (directory) depending on the step in the process. The
application is a combination of Worksheets and VBA modules. Each step is
initiated by clicking a command button that is embedded in the excel
worksheet. The current workbook is then moved to the new directory. The
move is accomplished via a SaveAs command.

What I'm having problems with is deleting the original version of the
workbook left behind after the new file has been saved in the new
directory/library. I have tried Kill and the FSO.DeleteFile method with no
results. I want to accomplish this using VBA within the application workbook.

I have accomplished this a number of times in prior projects outside of
Sharepoint server. This is my first project using Sharepoint Server, which
may account for part of the reason (not being familiar with the correct way
to do this in the Sharepoint environment). I can even run this application
on my local drive with no problem.

Is there a solution or direction I can look in to resolve this?? Anyone who
can assist, please let me know as soon as possible.

Thanks,

Ken Etter

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Unable to delete file from Sharepoint Server Library using VBA

I've gotten around that by using some code to select the folder and/or file
to use and the user can select it using their mapped name.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

Barb,

I tried your suggestion, but it won't let me map a drive at the root
directory. Because we have multiple subdirectories, one for each step in the
process, this will not work.

In addition, I am already questioning the feasibility of creating map drives
that would require drive letter to be stored in the filepath for each step
directory. If a company manager trying to use this did not have the same
drive mapping, the application would not work for him.

Any other suggestions would be great and are appreciated.

Thanks,

Ken


"Barb Reinhardt" wrote:

I've run some macros from within excel on Sharepoint server and the way I
accessed the files was using a mapped drive. It might work if you accessed
them that way.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

I have an Excel application which needs to move the workbook to different
Sharepoint library (directory) depending on the step in the process. The
application is a combination of Worksheets and VBA modules. Each step is
initiated by clicking a command button that is embedded in the excel
worksheet. The current workbook is then moved to the new directory. The
move is accomplished via a SaveAs command.

What I'm having problems with is deleting the original version of the
workbook left behind after the new file has been saved in the new
directory/library. I have tried Kill and the FSO.DeleteFile method with no
results. I want to accomplish this using VBA within the application workbook.

I have accomplished this a number of times in prior projects outside of
Sharepoint server. This is my first project using Sharepoint Server, which
may account for part of the reason (not being familiar with the correct way
to do this in the Sharepoint environment). I can even run this application
on my local drive with no problem.

Is there a solution or direction I can look in to resolve this?? Anyone who
can assist, please let me know as soon as possible.

Thanks,

Ken Etter

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Unable to delete file from Sharepoint Server Library using VBA

So you tried to remove it using VBA.

Have you tried creating a VBScript that removies it and calling the
VBScript from VBA?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Unable to delete file from Sharepoint Server Library using VBA

I don't understand why you want to save to a shared drive when you are
using Sharepoint. Can't you save there?
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Unable to delete file from Sharepoint Server Library using VBA

I couldn't map a SharePoint drive when my WebClient service was not running.
I don't know what turns it on/off, but that solved my problem.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

Barb,

I tried your suggestion, but it won't let me map a drive at the root
directory. Because we have multiple subdirectories, one for each step in the
process, this will not work.

In addition, I am already questioning the feasibility of creating map drives
that would require drive letter to be stored in the filepath for each step
directory. If a company manager trying to use this did not have the same
drive mapping, the application would not work for him.

Any other suggestions would be great and are appreciated.

Thanks,

Ken


"Barb Reinhardt" wrote:

I've run some macros from within excel on Sharepoint server and the way I
accessed the files was using a mapped drive. It might work if you accessed
them that way.
--
HTH,
Barb Reinhardt



"Net_prof" wrote:

I have an Excel application which needs to move the workbook to different
Sharepoint library (directory) depending on the step in the process. The
application is a combination of Worksheets and VBA modules. Each step is
initiated by clicking a command button that is embedded in the excel
worksheet. The current workbook is then moved to the new directory. The
move is accomplished via a SaveAs command.

What I'm having problems with is deleting the original version of the
workbook left behind after the new file has been saved in the new
directory/library. I have tried Kill and the FSO.DeleteFile method with no
results. I want to accomplish this using VBA within the application workbook.

I have accomplished this a number of times in prior projects outside of
Sharepoint server. This is my first project using Sharepoint Server, which
may account for part of the reason (not being familiar with the correct way
to do this in the Sharepoint environment). I can even run this application
on my local drive with no problem.

Is there a solution or direction I can look in to resolve this?? Anyone who
can assist, please let me know as soon as possible.

Thanks,

Ken Etter

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
Unable to modify 2007 file on NAS server shared drive shyam joshi Excel Discussion (Misc queries) 0 August 16th 09 08:05 PM
excel is connected to sharepoint server and says too many members puneet kinger Excel Discussion (Misc queries) 0 May 11th 07 12:49 PM
Issue with Template Wizard and SharePoint Document Library Pandoro Excel Discussion (Misc queries) 0 May 8th 06 03:40 AM
#VALUE error when referencing spreadsheet on sharepoint library Lois Johns Excel Worksheet Functions 2 May 19th 05 05:38 PM
file delete in Excel receives permission denied by Server 2003 phurst Excel Programming 2 March 10th 05 09:43 PM


All times are GMT +1. The time now is 01:19 AM.

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"