我有一个我在Word 2010中开发的宏.
如何将此信息发送给他人使用?
一个大小为a × a的正方形可以装入半径为R的圆中?
我不需要解决方案.我只是需要某种创意.
我在excel宏中存储了以下内容: -
Sub Sales()
Dim StrSQl As String
Con = "Provider=IBMDA400;Data Source=192.168.2.2;User Id=boss;Password=1we56"
Set Db = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.recordset")
Db.connectionSTring = Con
Db.Open
StrSQl = "select myuc, sum (myac) as Amount from myabc.myqwerty where mydt >= 20100101 and mydt <= 20100831 group by (mycl)"
rs.Open StrSQl, Db, 3, 3
Sheet1.Cells(10, 1).CopyFromRecordset rs
rs.Close
Set rs = Nothing
Set cn = Nothing
End Sub
Run Code Online (Sandbox Code Playgroud)
我想掩盖上面的用户名和密码即.User Id=****;Password=*****作为安全的一部分.
那可能吗?
我写了一些功能性的VBA:
Sheets("Src").Range("A2:A9").Copy Destination:=Sheets("Dest").Range("A2")
Run Code Online (Sandbox Code Playgroud)
我想将源范围提取到变量中以获得灵活性.
SrcRange = Sheets("Src").Range("A2:A9")
SrcRange.Copy Destination:=Sheets("Dest").Range("A2")
Run Code Online (Sandbox Code Playgroud)
但是,这不起作用.什么SrcRange应该变暗?第一行是否正确?
我尝试了Dimming SrcRange作为Range,它给了我
Runtime error 91: Object Variable or With block variable not set
我对语言不太熟悉,文档让我想要(我找不到Sheets(索引)调用的返回类型,这是我发现的最接近的).当我点击Record Macro,执行一些动作,然后点击停止时,Macro正文仍为空白.
谁能解释一下如何使用SrcRange作为变量?
我有一个简单的功能,其中有一个组合框.如果组合框的值等于"禁用",我将禁用文本框B.有许多组合框及其对应的文本框B,按行排列并手动命名.如果命名了组合框A Product1,则将命名文本框B.Product1_status
我想的是:
If value_of_a = "disable" Then
Dim name_of_b as String
name_of_b = Me.Combo.Name + "_status"
get_object_by_name(name_of_b).Enabled = False
End If
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?
我刚决定并安装了p4merge作为git的可视化合并工具.为了做到这一点,我使用此命令配置了我的git
git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd 'p4merge $BASE $LOCAL $REMOTE $MERGED'
Run Code Online (Sandbox Code Playgroud)
然后我测试了它们并运行git difftool命令,它运行得很好.但是当我跑步时git difftool --cached,p4merge显示错误信息:
nul is (or points to) an invalid file
Run Code Online (Sandbox Code Playgroud)
我也尝试按照此博客中的说明操作,但我无法解决问题.
顺便说一句,我在Windows 7上使用git和p4merge.有谁知道这个问题的解决方案?
我正在做一些POC.我在MySQL中编写了一个存储过程.我正在使用MySQLWorkbench进行数据库操作,如创建新表,存储过程,查询执行等.即使代码在语法和逻辑上看起来正确,我也会观察到一些意外的执行行为.
以下是要点.
方法1 -
在第一种方法中,我正在使用INSERT INTO ... SELECT语句创建临时表并使用所选列添加记录.
CREATE TEMPORARY TABLE XYZ(....);
INSERT INTO XYZ (....) SELECT (....) FROM ABC WHERE clause;
Run Code Online (Sandbox Code Playgroud)
执行此操作后,我只在临时表的几列中获取空值,并且所有其他临时表列都填充了正确的值.
如果我在单独的SQL选项卡中运行相同的select语句(对于相同的where子句),即使对于在临时表中获取空值的那些列,我也可以看到正确的输出.
如果我用*(所有列)更改上面的INSERT INTO..SELECT语句,那么我在临时表中得到正确的输出..
INSERT INTO XYZ SELECT * FROM ABC WHERE clause;
Run Code Online (Sandbox Code Playgroud)
但是不要想要所有列.我还尝试使用ENGINE = value创建临时表.但没有奏效.即使我用普通表(没有TEMPORARY)尝试了所有这种方法,但不幸的是
方法2 -
在第二种方法中,我用光标而不是临时表修改了相同的存储过程.但即使在这种情况下,游标也没有获得任何记录.
DECLARE cur1 CURSOR FOR SELECT (....) FROM ABC WHERE clause;
Run Code Online (Sandbox Code Playgroud)
如果我在单独的SQL选项卡中运行相同的select语句(对于相同的where子句),我可以看到正确的输出.
难道我做错了什么?我可以就此得到任何建议吗?
提前致谢.
我总是得到:
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' while setting constructor argument with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0': Cannot resolve reference to bean 'org.springframework.security.authentication.ProviderManager#0' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name …Run Code Online (Sandbox Code Playgroud) 我想打开一个Excel文件,转到文件中的第一个工作表,然后将textbox1的文本颜色更改为红色.
到目前为止,我设法做到的唯一方法是通过录制宏.
它给了我
Workbooks.Open (fPath & sName)
Sheets(1).Select
ActiveSheet.Shapes.Range(Array("TextBox1")).Select
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 262).Font.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0
.Solid
End With
Run Code Online (Sandbox Code Playgroud)
没关系; 但是文本的长度是可变的,所以如果它小于上面的262个字符,我会得到代码错误.
我试着介绍一下
CharCount = Len(textbox1.Text)
Run Code Online (Sandbox Code Playgroud)
但是我得到错误424对象需要
我最初尝试过
Sheets(1).Select
ActiveSheet.TextBox1.ForeColor = RGB(255, 0, 0)
Run Code Online (Sandbox Code Playgroud)
但得到错误438对象不支持此属性或方法.
我目前正在阅读ConstraintLayout教程并坚持特定步骤(https://codelabs.developers.google.com/codelabs/constraint-layout/#10).
来源在这里(https://github.com/googlecodelabs/constraint-layout).
根据下面的说明,它表示添加垂直屏障,但我没有在菜单中看到添加选项.实际上整个菜单选项看起来不同."添加垂直屏障"菜单在哪里?
右键单击蓝图或组件树中的ConstraintLayout.您将看到"添加垂直"障碍和"添加水平障碍"选项.
我正在运行Android 2.3.3.
build.gradle(模块:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.google.googleio"
minSdkVersion 22
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.1.0-beta1'
}
Run Code Online (Sandbox Code Playgroud)