Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 24th, 2008, 04:56 AM
Authorized User
Points: 493, Level: 7
Points: 493, Level: 7 Points: 493, Level: 7 Points: 493, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2006
Location: gandhinagar, gujarat, India.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access permisison

Hi All

I have one application in Visual Basic.I have created one folder at runtime.I want to give permission to that folder that only administrator can access this folder,nobody can.

Is it possible in visual basic?

Second problem is:I have created runtime excel files.It works perfectly.

But problem is i want set allignment property through coding excel file.

My code is:

Set AppXls = CreateObject("Excel.Application")
Set ObjWb = AppXls.Workbooks.Add

Set ObjWs = ObjWb.Worksheets.Add
ObjWs.Range("B1").Value = "SISTER NIVEDITA SCHOOL ON WHEELS"
ObjWs.Range("B2").Value = "SUPPORTED BY"
'ObjWs.Range("B2").Font.Bold = True
ObjWs.Range("B3").Value = "SHARE AND CARE FOUNDATION-U.S.A"
ObjWs.Range("B4").Value = "MEDICAL REPORT"
ObjWs.Range("C4").Value = Label3.Caption
ObjWs.Range("D4").Value = txt_date.Text
ObjWs.Range("B7") = Text1(0).Text
ObjWs.Range("B8") = cmb_address.Text
ObjWs.Range("B9") = Text1(2).Text

what i do?

Pls help me.

Thanks
monika

  #2 (permalink)  
Old July 24th, 2008, 07:47 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there..

Did you try the filesystemobject that's inside the scripting runtime in VB? maybe you can change permissions from there (although I don't remember is that object fits you)...

For the excel part, the easy trick is to save a macro that do what you need (just start saving a macro, do all the alignment you need, then stop the macro). After that, check the code that excel wrote for you, and done.



HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
  #3 (permalink)  
Old July 25th, 2008, 11:53 PM
Authorized User
Points: 493, Level: 7
Points: 493, Level: 7 Points: 493, Level: 7 Points: 493, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2006
Location: gandhinagar, gujarat, India.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi all

I have already posted my article for access permission.

But i would like to know how to give password and username to folder which is created at runtime?

is it possible through coding in vb?

If yes pls help me

Thnaks
monika

  #4 (permalink)  
Old July 31st, 2008, 01:08 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

The mechanism that Microsoft has for controlling access to resources in the file system (files, folders, etc.) is through the Access Control List (ACL). Though it is pretty easy to use this through Windows Explorer, the means through code is pretty involved.

You have to do things like creating an Access Control Entry object (ACE), adjusting its properties, then adding it to the collection of ACEs that a given resource has. It is a lot of code, but it is absolutely something that can be done through Visual Basic code.

I don’t believe you can set a password on a resource. It is controlled through the person logged onto the machine, and that [u]does</u> involve a password.

I have entered the acronyms involved so that you will have some detail through which to make a web search.


Similar Threads
Thread Thread Starter Forum Replies Last Post
401.3 Access denied due to Access Control List cforsyth .NET Framework 2.0 8 May 28th, 2009 01:56 PM
SQL Access/ASP.NET data access issue saeta57 SQL Server ASP 1 July 4th, 2004 04:29 PM
SQL Access/ASP.NET data access issue saeta57 Classic ASP Databases 1 July 4th, 2004 03:32 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.