Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Adding Field In A Active Report And Make It Run


hello i'm a newbie in Visual Basic and I would like to ask about active report in the report that I've made there are four fields, i've add two fields in it but everytme i try to make it run the records that should be in it is do not appear what would be the problem?

any help would be appreciated




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Vb6 With Active Report - Cannot Call Other Report Data Field
Below is the coding:
Problem is this sentences: rptAmt2.Fields("Amt3").Value = 0
It cannot identifier rptAmt2 which another report data field.
Can anyone help me, thank you.


Dim rptAmt As New rptFinanceAmt
Dim rptAmt2 As New rptFinanceAmt2

If Fields("Amt3").Value = 0 And rptAmt2.Fields("Amt3").Value = 0 And rptAmt.Fields("Amt3").Value = 0 Then Fields("Amt3").Value = ""

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 = Empty And rptAmt.txtAmt <> Empty Then Fields("Amt3").Value = 0

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt = Empty Then Fields("Amt3").Value = 0

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt <> Empty Thenb Fields("Amt3").Value = 0

End If

How To Make Print Preview Of Listview With Datadynamics Active Report?
Im using Datadynamics Active Report Professional Version 2, All I want to do is that I want to make report preview and print all the contents of listview (in report mode). Please tell me how to do that.
Thank you!
saracjl

Adding New Database Field In Crystal Report 8
how could I insert a new database field in crystal report 8?

This is my problem goes... I have an existing report which it needs to insert a new field(not in my existing database fields). my CR database is Field Definition(salesman.ttx) which I modified the file and inserted with a new field.

the problem is when I call the CR from my vb program, it doesnt display my additional field. but when I created another report it appeared. is that the way CR8 works?

please help me.

thanks in advance

Accessing Main Report Field From Sub Report In Crystal Report 8.5
Hi there,

is it possible to access a field that is in a main report from the subreport. The sub report and main report uses different Sql
statment. How could i achive this.

The reason i need this is because, i would like a value to appear
in a fieldA in the subreport, if the value in fildmain in main repoert is equals to 10.

any suggestions....

Thank You...

regards ....

How To Calculate Sum Of Parent Report's Field And Subreport's Field
Can any one tell me how to refer to subreport for calculating sum.
I have a parent report's field amount and i want it to add in the subreport's already calculated Sum(amount).
means amount+Sum(subreport's Amount) .

Help Me!

Adding Two Field's Data Ino One Field
hello

The following SQL command adds two fields data into one field.

tbl1 structure:
_____________________________
field1 field2

a1 b1
a2 b2
a3 b3
a4 b4
____________________________

Select field1,field2 as fieldNew from tbl1;

the result is :

___________________________
fieldNew

a1b1
a2b2
a3b3
a4b4

__________________________


But I want to get:


_________________________

fieldNew

a1
a2
a3
a4
b1
b2
b3
b4


________________________



Please anyone help me to solve this problem.


Thank you all.

Bye...

Adding Two Field's Data Into One Field Using SQL.
Hello...

Can anyone tell me how can I Get two different field's data into one (newly named) Field using SQL?or VB?

Displaying A Field On A Report That Is Dependent On Another Field...
Hi everyone,

I have a field in my table called "Received", which is a yes/no type field, and when displayed on a report it shows 0 if the books in question have Not been Received, and -1 if they have been Received. On this datareport I am grouping by this field: all of the 0s go together, all of the -1s go together.

I'm trying to find out a way to display a field that will say either "Received" or "Not Received" depending on whether the group of books has been received or not, but I can't figure out a way to make a calculated field that is dependent on the Received field. ???

Any suggestions??

Change Background Color Only When Any Field Is Active
I have a form [In MS Access 2000] with many input fields for gathering data from users.

My users would like the background color to change from gray to white in the active field. When they leave that fileld they want it to revert back to gray.

I can create an enter and exit event on every field on my form, but would prefer and appreciate some help with a cleaner, simpler way to do this.

Thank you
WinDancer

Link Slider Bar (Active X) To Field In Table?
I would like the slider bar to generate a numerical value in my table (field). How do I do this?


gandalf1

Distributing Active Data Field Definitions
Hi

I have created few crystal reports using Active Data Definitions. I'm using a temporary recordset and create a structure exactly like the TTX file.

All are working fine, but how will I distribute them with my application? Do I have to include any special DLLs or do I have to create these connections in ODBC setup?

Please help.

THANK YOU !

How Make Active X
I,m a new at the active x and Im looking for
simple example like command button
it has a propertise caption ,enabled
and event ,click ,
by using class

Extract Data From Active Directory Into VB Form Field
I've developed a Word template which requires users to enter some data into a VB form which then populates bookmarks in Word. It works fine. At the moment they enter, for instance, their name and it's stored in the Word registry so that the form is pre-populated the next time they use the template.
Now the company want me to extract the user details for from Active Directory (instead of using the registry approach). Has anyone done this? I need some help please!

Display With Different Fonts The Active Field In Access Form
I have a Ms Access form with default view "Continuous Forms".
How can I change the fonts of active field (or entire active row) in specific row, in run time?

The above emphasize to which row user works.

Can u help me?

Michael Sakellis
Athens-Greece

Edited by - micsak on 6/10/2008 6:19:17 AM

Adding Active X Controls In VS2005E
I'm relatively new to VB, so you'll have to bare with me here

I've got the free version of Visual Studio (2005 Express). I was searching through the help files and it said there's no Object Container control in VS2005. Instead you have to use the Web control and run active x controls from that. This is a pain because you get a million security messages whenever you try and do anything with the active x control (it's an X3D world containing links to programs/folders/etc.)

Is there any way around this? Is there any other free or cheap Visual Basic tool that does have an Object Container, because it sounds really useful.

Adding An Active Directory User ???
I am having a problem with automating Active Directory management. When adding a user to Active Directory using the following code, it seems to only add the user name as a "SAM Account Name". In other words, while looking in Windows 2000 Server "Active Directory Users and Computers", I only see the user name under "User Logon Name (Pre-Windows 2000)" rather than just plain "User Logon Name". Does anyone have any idea how to add a normal user name (not pre-Windows 2000) ???

My code is as follows:

Dim oContainer As IADsContainer
Dim oUser As IADsUser
Dim oDomain As IADsDomain

Set oContainer = GetObject("WinNT://Some Domain")
Set oUser = oContainer.Create("User", "jsmith")
oUser.SetPassword "somepassword"
oUser.FullName = "Jack Smith"
oUser.SetInfo

Set oContainer = Nothing
Set oUser = Nothing

Any help would be greatly appreciated.

Adding Labels To A Report At Runtime (using Microsoft Data Report Designer 6.0)
Hi,

I have just tarted using the Microsoft Data Report Designer and I need a little help. I am trying to get it to add labels to a report at run-time rather than design time.

The report is supposed to save the results of some analysis. Lets for simplicitry sake say that I just want to display a list of value stored in an array, but the number of placs in the array is not known until the proram has actually run. I.e. it would e something like this:

for i = 0 to ubound(myArray)-1
myReport.addItem (newLabel(i))
newLabel(i).caption = myarray(i)
next i

Does this make sense, but how would I do this (there is no 'addItem' property of the report)?

How To Make Window Active
I am writing a vb program to run with my AutoCAD program. What I am looking to do is when I hit "OK" on my program, the AutoCAD window is set to the activate window. That is, if I type something, it will type on my AutoCAD window, and not my program window. I hope you understand what I'm looking for.

Make Form Active
I am implementing a search function for which I have made the search form "always on top" with the SetWindow API. This works except when it finds something on the other form, I want the other form to become the active form so the user can see the selected item in the other forms treeview. Anyone know the API call to ensure form is the active form.

How To Make It The Active Application?
What I would simply make is like the RESTORE command...

Make Window Active
Hi, All
I am Looking for API which allows moving focus from one window to another. I need to make my VB form active after Internet Explorer displayed some web page. Could not find so far…
Thanks a lot

How To Make A Form The Active One?
I have a program and when it starts up its supposed to auto load another form...problem is that form ends up being in the background.

How can I make it the active form?
Also is there a way to make a form ALWAYS on top?

Thanks for any help.

Adding Multiple Computers In Active Directory
I have a script that is suppose to add Multiple computers in Active Directory by pointing to a .txt file. My script runs without any problems, but in never actually adds the computer objects. Any ideas or does anyone know of a better way of doing this?

addpcstoOU.vbs
' The script will take a text file with names and create computer accounts in your OU.
' To run the script open a command line and type cscript addpctoOU.vbs < workstations.txt
' where workstations.txt hold the names of the computer accounts you wish to add.
' This text file must contain one computer account name per line.
' In order to get the computer account in the correct OU you must edit the line
' Set objContainer = GetObject("LDAP://OU=workstations,OU=AIT,OU=ASET,OU=ITS,OU=UP,OU=PSUOUs," & _
' to reflect


' Set objContainer = GetObject("LDAP://OU=yourworkstationOU,OU=yourOU,OU=UP,OU=PSUOUs," & _

dim objFile, arrInfo, p


set objFile = WScript.StdIn
Do While Not objFile.AtEndofStream
call addpctoou(objFile.ReadLine())
Loop
set objFile=nothing



sub addpctoou(strComputer)


On Error Resume Next


' Edit this line to delegate the ability to install the machine into the OU


strComputerUser = "accessdlt_techs"

Const ADS_UF_PASSWD_NOTREQD = &h0020
Const ADS_UF_WORKSTATION_TRUST_ACCOUNT = &h1000
Const ADS_ACETYPE_ACCESS_ALLOWED = &h0
Const ADS_ACETYPE_ACCESS_ALLOWED_OBJECT = &h5
Const ADS_FLAG_OBJECT_TYPE_PRESENT = &h1
Const ADS_RIGHT_GENERIC_READ = &h80000000
Const ADS_RIGHT_DS_SELF = &h8
Const ADS_RIGHT_DS_WRITE_PROP = &h20
Const ADS_RIGHT_DS_CONTROL_ACCESS = &h100

Const ALLOWED_TO_AUTHENTICATE = _
"{68B1D179-0D15-4d4f-AB71-46152E79A7BC}"
Const RECEIVE_AS = "{AB721A56-1E2f-11D0-9819-00AA0040529B}"
Const SEND_AS = "{AB721A54-1E2f-11D0-9819-00AA0040529B}"
Const USER_CHANGE_PASSWORD = _
"{AB721A53-1E2f-11D0-9819-00AA0040529b}"
Const USER_FORCE_CHANGE_PASSWORD = _
"{00299570-246D-11D0-A768-00AA006E0529}"
Const USER_ACCOUNT_RESTRICTIONS = _
"{4C164200-20C0-11D0-A768-00AA006E0529}"
Const VALIDATED_DNS_HOST_NAME = _
"{72E39547-7B18-11D1-ADEF-00C04FD8D5CD}"
Const VALIDATED_SPN = "{F3A64788-5306-11D1-A9C5-0000F80367C1}"

Set objRootDSE = GetObject("LDAP://rootDSE")


' Edit this line to reflect your OU in the ACCESS Domain


Set objContainer = GetObject("LDAP://OU=Altoona,OU=Campuses,OU=DLT Public,DC=dlt,dc=access,dc=psu,dc=edu")

Set objComputer = objContainer.Create _
("Computer", "cn=" & strComputer)
objComputer.Put "sAMAccountName", strComputer & "$"
objComputer.Put "userAccountControl", _
ADS_UF_PASSWD_NOTREQD Or ADS_UF_WORKSTATION_TRUST_ACCOUNT
objComputer.SetInfo

Set objSecurityDescriptor = objComputer.Get("ntSecurityDescriptor")
Set objDACL = objSecurityDescriptor.DiscretionaryAcl

Set objACE1 = CreateObject("AccessControlEntry")
objACE1.Trustee = strComputerUser
objACE1.AccessMask = ADS_RIGHT_GENERIC_READ
objACE1.AceFlags = 0
objACE1.AceType = ADS_ACETYPE_ACCESS_ALLOWED

Set objACE2 = CreateObject("AccessControlEntry")
objACE2.Trustee = strComputerUser
objACE2.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE2.AceFlags = 0
objACE2.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE2.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE2.ObjectType = ALLOWED_TO_AUTHENTICATE

Set objACE3 = CreateObject("AccessControlEntry")
objACE3.Trustee = strComputerUser
objACE3.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE3.AceFlags = 0
objACE3.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE3.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE3.ObjectType = RECEIVE_AS

Set objACE4 = CreateObject("AccessControlEntry")
objACE4.Trustee = strComputerUser
objACE4.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE4.AceFlags = 0
objACE4.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE4.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE4.ObjectType = SEND_AS

Set objACE5 = CreateObject("AccessControlEntry")
objACE5.Trustee = strComputerUser
objACE5.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE5.AceFlags = 0
objACE5.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE5.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE5.ObjectType = USER_CHANGE_PASSWORD

Set objACE6 = CreateObject("AccessControlEntry")
objACE6.Trustee = strComputerUser
objACE6.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE6.AceFlags = 0
objACE6.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE6.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE6.ObjectType = USER_FORCE_CHANGE_PASSWORD

Set objACE7 = CreateObject("AccessControlEntry")
objACE7.Trustee = strComputerUser
objACE7.AccessMask = ADS_RIGHT_DS_WRITE_PROP
objACE7.AceFlags = 0
objACE7.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE7.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE7.ObjectType = USER_ACCOUNT_RESTRICTIONS

Set objACE8 = CreateObject("AccessControlEntry")
objACE8.Trustee = strComputerUser
objACE8.AccessMask = ADS_RIGHT_DS_SELF
objACE8.AceFlags = 0
objACE8.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE8.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE8.ObjectType = VALIDATED_DNS_HOST_NAME

Set objACE9 = CreateObject("AccessControlEntry")
objACE9.Trustee = strComputerUser
objACE9.AccessMask = ADS_RIGHT_DS_SELF
objACE9.AceFlags = 0
objACE9.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE9.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE9.ObjectType = VALIDATED_SPN

objDACL.AddAce objACE1
objDACL.AddAce objACE2
objDACL.AddAce objACE3
objDACL.AddAce objACE4
objDACL.AddAce objACE5
objDACL.AddAce objACE6
objDACL.AddAce objACE7
objDACL.AddAce objACE8
objDACL.AddAce objACE9

objSecurityDescriptor.DiscretionaryAcl = objDACL
objComputer.Put "ntSecurityDescriptor", objSecurityDescriptor
objComputer.SetInfo


end sub

Adding Active Com Port Into COmbo List
Hi, how can i code this function?
I want to add only the active com port on my Combo List..
Only the availbale ComPort on my Device Manager.

Adding Property Pages To An Active X Control.
It's possible to add an AboutBox to an homemade ActiveX control, but is it possible to add a Property menu (like when you right click on a ListView and go to Properties) to such a control?

Is it possible to delegate a Properties page to a consitutent control on the ActiveX control? (For instance, if you have a ListView in your ActiveX control, is it possible to make the ActiveX display the Properties page of the ListView?)

Thanks guys,

Steve.

Newbie Needs Help With Adding User To Active Directory
i (thought) i'd figured this out, but i'm getting an error of "Microsoft VBScript compilation error '800a03ee" on the following code. can anyone help? i'm not seeing the syntax errors...

<% @language="VBSCRIPT" %>
<%
Const ADS_UF_SCRIPT = &H1
Const ADS_UF_ACCOUNTDISABLE = &H2
Const ADS_UF_HOMEDIR_REQUIRED = &H8
Const ADS_UF_LOCKOUT = &H10
Const ADS_UF_PASSWD_NOTREQD = &H20
Const ADS_UF_PASSWD_CANT_CHANGE = &H40
Const ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = &H80
Const ADS_UF_TEMP_DUPLICATE_ACCOUNT = &H100
Const ADS_UF_NORMAL_ACCOUNT = &H200
Const ADS_UF_INTERDOMAIN_TRUST_ACCOUNT = &H800
Const ADS_UF_WORKSTATION_TRUST_ACCOUNT = &H1000
Const ADS_UF_SERVER_TRUST_ACCOUNT = &H2000
Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000
Const ADS_UF_MNS_LOGON_ACCOUNT = &H20000
Const ADS_UF_SMARTCARD_REQUIRED = &H40000
Const ADS_UF_TRUSTED_FOR_DELEGATION = &H80000
Const ADS_UF_NOT_DELEGATED = &H100000
Const ADS_UF_USE_DES_KEY_ONLY = &H200000
Const ADS_UF_DONT_REQUIRE_PREAUTH = &H400000
Const ADS_UF_PASSWORD_EXPIRED = &H800000
Const ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = &H1000000

Public Sub CreateUser(strUserName As String, strSAMAccountName As String, strPassword As String)
Dim objMACwifi As IADs
Dim objUsers As IADsContainer
Dim objNewUser As IADsUser

On Error Resume Next

' Bind to the rootDSE object.
Set objMACwifi = GetObject("LDAP://DC=iig1,DC=com")
If (Err.Number <> 0) Then
Exit Sub
End If

' Bind to the Users folder in the domain.
Set objUsers = GetObject("LDAP://CN=DevSite,CN=SiteRoot" & objMACwifi.Get("defaultNamingContext"))
If (Err.Number <> 0) Then
Exit Sub
End If

' Create the user object.
Set objNewUser = objUsers.Create("user", "CN=" + strUserName)
If (Err.Number <> 0) Then
Exit Sub
End If

' Set the sAMAccountName property.
objNewUser.Put "sAMAccountName", strSAMAccountName
If (Err.Number <> 0) Then
Exit Sub
End If

' Commit the new user.
objNewUser.SetInfo
If (Err.Number <> 0) Then
Exit Sub
End If

' Set the initial password. This must be performed after
' SetInfo is called because the user object must
' already exist on the server.
objNewUser.SetPassword strPassword
If (Err.Number <> 0) Then
Exit Sub
End If


' To enable the user account, remove the
' ADS_UF_ACCOUNTDISABLE flag from the userAccountControl
' property. Also, remove the ADS_UF_PASSWD_NOTREQD and
' ADS_UF_DONT_EXPIRE_PASSWD flags from the
' userAccountControl property.
userActCtrl = objNewUser.Get("userAccountControl")
objNewUser.Put "userAccountControl", userActCtrl
If (Err.Number <> 0) Then
Exit Sub
End If

' Commit the updated properties.
objNewUser.SetInfo
End Sub


Response.Redirect("http://www.thedionysian.com")
%>

How To Make Events Visible In A Active-X
Hello,

I have the following problem: I’m building a VB6application. The output is as Active-X component. In a Lab Windows environment I make contact with this active-X component. Here I notice that only a view Function / Events are “visible”

In VB6 I’ve defined Public Functions and Events. Events where I pass “standard” types like Byte, Integers or Chars with the events there are no problems. These are visible in Lab Windows. But when I pass a user defined types with the event there seems to be a problem. (This problem does not exist during testing in de IDE of Visual Basic)

Does anyone recognize this problem and if so please help me to solve (test) it.

Hope to hear from you soon,

Kind regards

John Ploeg

Make My Program The Active Window
Hi there!

Please could you help me to make my vb application the active window if for any reason another application is the active window?

API - Make Another Program The Active Window?
How can I use api to make another program the active window when a command button is clicked?

(Macro Program).


Also how can I find the handle of the window im trying to make active?

How Do Make An Active Item, In A Listbox
I have a listbox , which is populated with certain database values that I pulled thru a Stored Proc. and I have to take these one of these values from the command line parameters.

Eg.

Listbox Items -ListBox Even Numbers , 2, 4, 6,8,10 .. etc. (from database pull)

commandline parameters - I supply 6-

I have code ready for parsing command line parameters .

now here is the question.

How do I activate the listBox item ( i.e. highlight it ) to the item which was passed thru the command$ ?

So when the listbox loads... it has the one activated / highlighted which i passed thru the command line param.

hope I am clear.

How To Make Apps On Topmost And Set Active?
I'm developing a program that would make the application on topmost and currently get focused. Using API call setwindowpos ontopmost does not work on games such as NBA live, Generals; when my programs which is on timer is loaded it is still at the bottom window and gets only at the top when mouse is click otherwise it does not work. Though this API call is effective on windows based program and eventhough on half life (counter strike) it does not work on some 3D games. Anyone knows how.... please help me?


Cannot Make Active X Component Work, Please Help :(
I created an Active X DLL a few months ago in VB and it worked fine.  Recently a crash left me without my VB files, but I had my code pasted from an e-mail.  I have been trying to recreate the files but I don't know what I'm missing.  The code should work because it's direct from the last version.  I just don't know what I'm doing wrong.

In my DLL I have the project named ACAS400DLL.  My class module inside is named GetLoanNum and the code in that class module is:

CODEPublic Num As String

Public Function GetLoanNum() As String

    On Error GoTo GetDllErr
   {Processing code removed}

                GetLoanNum = "123456789"
    
    Exit Function
    
GetDllErr:
    MsgBox Error(Err)
    Exit Function
    
    
End Function

Private Function isAllNums(testString As String) As Boolean

    Dim x As Integer
    
    isAllNums = False
    
    For x = 1 To Len(testString)
        Select Case Mid(testString, x, 1)
        Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"
            isAllNums = True
        Case Else
            isAllNums = False
        End Select
    Next x


End Function



Make EVB Application The Active Task ?
Hi,

Can anyone please help me with the following problem:

I have an eVB application running on an iPAQ. What I want to accomplish is that, say the user is browsing through his mail on the iPAQ, and my eVB application is one of the other tasks, I want to make the eVB application the top-most visible and active application when a certain event pertaining to my eVB application occurs.

Is there a way I can do this ?

I would greatly appreciate any help in this direction.

Thank you.

Rao

How Do U Make A Cell Active In A Grid?
How do U make a cell active in a grid so a user can write in it? Using VB6...

Adding An Extra Button To The Titlebar Of The Active Application.
Ok i have someone who wants me to write an app that adds an extra button next to the minimize button on the currently active applications title bar.

What would be the best way to determine the current application and then draw the button?

Thanks for any help.

Adding Toolbars And Menus To Container From Active Documents
Hi!


I need help adding toolbars and menus from an ActiveX document to my container. I want to have my toolbars (definded in the document) appering in the toolbar/coolbar of the container. I also want to exchange menus and menuitems in the container. Just to make it a bit more complicated, the container is written in C++ by another team of developers.


Anybody got an idea on how to do this, or suggestions on books or articles handling the subject.


TIA

/Henrik

Make A Function Only When A Sheet Is Active/visible
Hi,

I would to put a condition when i am on a particular worksheet. what i want to do is if i am on sheet1 the formular applies a rule only on sheet1. if i am on sheet 2, the formular applies only on sheet2 and so on.

the code that i have done is:

Dim k As Integer
Dim lineno As Integer


If Worksheets("sheet1").visible = True Then
lineno = 1
Range("D5200").Clear

For k = 5 To 200
While Sheets("sheet" & lineno).Cells(k, 4).Value = ""
Sheets("sheet" & lineno).Cells(k, 4).Value = Sheets("sheet" & lineno).Cells(k, 2).Value * Sheets("sheet" & lineno).Cells(k, 5).Value / Sheets("sheet" & lineno).Cells(4, 9).Value
Wend
Next k
MsgBox lineno

ElseIf Worksheets("sheet2").visible = True Then
lineno = 2
Range("D5200").Clear

For k = 5 To 200
While Sheets("sheet" & lineno).Cells(k, 4).Value = ""
Sheets("sheet" & lineno).Cells(k, 4).Value = Sheets("sheet" & lineno).Cells(k, 2).Value * Sheets("sheet" & lineno).Cells(k, 5).Value / Sheets("sheet" & lineno).Cells(4, 9).Value
Wend
Next k
MsgBox lineno
End If

EXCEL/VBA
Thanks for helping me on that one.

chatoon35

Make A Form The Topmost Active Window?
Hello,

How do you make a form become the top and active window (on top of any/all other windows/apps)?

Of course setting the windowstate to vbnormal doesn't do this, and I've tried the AppActivate, but it doesn't work either.

Here's how I'm testing to see if it works:
Blank form that starts minimized and has a timer set to 5 seconds.
In the timer event, I have the following code:


Code:
me.WindowState = vbNormal
AppActivate "Form1"
Timer1.Enabled = False

Of course, I'd replace the AppActivate with whatever does what I'm looking for.
Any ideas?

Thanks!
tk

[VB6] Make Txtbox Active Hence Do Not Need To Click On It To Type
How do i make a txtbox active hence do not need to click on it to type in it once form is loaded?

[RESOLVED} How To Make Active X Exe Not Delay Calling App
I have an active x exe. I am calling a method from a second app ... ie:

MyAX.myMethod

The method takes some time to execute and I would prefer not to have my second app wait on it to finish before continuing.

Is there any way to call an active x exe method and then continue prog execution imediately (before the method is finished)?

Thanks for any help.

How To Make Commond Dialog Active Window?
I have a program that can be minimized or in the tray and the common dialog is called when something happens in the browser..But my problem is that the common dialog when it pops up is not the active window the browser always stays active window..I have tried using setactivewindow api call but it doesnt seem to have an effect on the common dialog window..Does anyone know how I can fix this?

How Do U Make A Command Button Active With Code.
Hi, I'm trying to make a command button active without clicking but I'm getting nowhere. Can you please tell me how can I use code to make the button active without physically clicking it.

How Do I Make A 3rd Party Program The Active Application?
How do I make a 3rd party program get the focus?

I think it has something to do with "AppActivate" or something like this. An example would be appreciated, thanks.

Daniel_Christie

[This message has been edited by Daniel_Christie (edited 02-11-2000).]

Using The API, Can You Make Active Window Modal And Then Reset
I have a process that appears at this point to require using SendKeys (I know, I hate that part also). If I have to use that option, I would like to make the active window modal so they get to their intended destination.

If it is possible, how do I save the current "Modal state" for the active window, change it and then reset it. Thanks!

Have a great day!

j2consulting@yahoo.com

Using Form And Make The Sheet Active In Same Time
Hi guys
I want to run a form in excel which will run in background
and will still give me the ability to use the excel sheets.
it's gonna be like a toolbar but when it runs i want the ability to use the sheets.
now when i run the form the sheets are not activated.

how can i do this??

thx a lot!!

Adding A Field On The Fly
Is there a way to add a field to a database table through code in ADO?
thanks very much, ted

Adding A Field
I am trying to add a field to a DB, with SQL. Is this possible? Where should I look?

Adding A New Field.
Alright,
well I am making a database system for some people, and ive completed a good chunk of it.

now i just reliazed i needed to add another field in the database base.

Say i have Name, ID,Email. i need to add "address"/
now I use SQL statements to work with my database as i find that the easier, and i know ill have to rewrite all the my sql statements.

but for the future, how can i prevent this? as in if a new field is added then the sql statements are already updated.


especially for the insert statement.

Copyright © 2005-08 www.BigResource.com, All rights reserved